Skip to content

Commit d606d23

Browse files
authored
Merge pull request #1334 from rancher/pin-actions-to-sha-main
[main] Pin GH Actions to commit sha
2 parents 6a982c2 + d99a687 commit d606d23

11 files changed

Lines changed: 38 additions & 38 deletions

File tree

.github/workflows/apidiff.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,10 @@ jobs:
55
go-apidiff:
66
runs-on: ubuntu-latest
77
steps:
8-
- uses: actions/checkout@v5
8+
- uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd # v5
99
with:
1010
fetch-depth: 0
11-
- uses: actions/setup-go@v6
11+
- uses: actions/setup-go@4b73464bb391d4059bd26b0524d20df3927bd417 # v6
1212
with:
1313
go-version: 1.25.x
1414
- name: Generate API diff

.github/workflows/build.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,6 @@ jobs:
99
runs-on: ubuntu-latest
1010
steps:
1111
- name: Checkout code
12-
uses: actions/checkout@v5
12+
uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd # v5
1313
- name: Build
1414
run: make image-build

.github/workflows/delete-old-versions.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ jobs:
1111
packages: write
1212
steps:
1313
- name: Delete old gke-operator images
14-
uses: actions/delete-package-versions@v4
14+
uses: actions/delete-package-versions@0d39a63126868f5eefaa47169615edd3c0f61e20 # v4
1515
with:
1616
package-name: gke-operator
1717
package-type: container
@@ -20,7 +20,7 @@ jobs:
2020
owner: rancher
2121

2222
- name: Delete old rancher-gke-operator charts
23-
uses: actions/delete-package-versions@v4
23+
uses: actions/delete-package-versions@0d39a63126868f5eefaa47169615edd3c0f61e20 # v4
2424
with:
2525
package-name: rancher-gke-operator-chart/rancher-gke-operator
2626
package-type: container
@@ -29,7 +29,7 @@ jobs:
2929
owner: rancher
3030

3131
- name: Delete old rancher-gke-operator-crd charts
32-
uses: actions/delete-package-versions@v4
32+
uses: actions/delete-package-versions@0d39a63126868f5eefaa47169615edd3c0f61e20 # v4
3333
with:
3434
package-name: rancher-gke-operator-crd-chart/rancher-gke-operator-crd
3535
package-type: container

.github/workflows/e2e-branch.yaml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -25,12 +25,12 @@ jobs:
2525
runs-on: ubuntu-latest
2626
steps:
2727
- name: Checkout code
28-
uses: actions/checkout@v5
28+
uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd # v5
2929
with:
3030
ref: |
3131
${{ env.BRANCH }}
3232
- name: Login to GHCR registry
33-
uses: docker/login-action@v3
33+
uses: docker/login-action@c94ce9fb468520275223c153574b00df6fe4bcc9 # v3
3434
with:
3535
registry: ghcr.io
3636
username: ${{ github.actor }}
@@ -43,7 +43,7 @@ jobs:
4343
run: |
4444
make image-push
4545
- name: Install Go
46-
uses: actions/setup-go@v6
46+
uses: actions/setup-go@4b73464bb391d4059bd26b0524d20df3927bd417 # v6
4747
with:
4848
go-version: 1.25.x
4949
- uses: helm/kind-action@ef37e7f390d99f746eb8b610417061a60e82a6cc # v1.14.0
@@ -63,14 +63,14 @@ jobs:
6363
run: make e2e-tests
6464
- name: Archive artifacts
6565
if: always()
66-
uses: actions/upload-artifact@v6.0.0
66+
uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f # v6.0.0
6767
with:
6868
name: ci-artifacts-${{ env.BRANCH }}
6969
path: _artifacts
7070
if-no-files-found: ignore
7171
- name: Send failed status to slack
7272
if: failure() && github.event_name == 'schedule'
73-
uses: slackapi/slack-github-action@v2.1.1
73+
uses: slackapi/slack-github-action@91efab103c0de0a537f72a35f6b8cda0ee76bf0a # v2.1.1
7474
with:
7575
payload: |
7676
{

.github/workflows/fossa.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,13 +20,13 @@ jobs:
2020
# The FOSSA token is shared between all repos in Rancher's GH org. It can be
2121
# used directly and there is no need to request specific access to EIO.
2222
- name: Read FOSSA token
23-
uses: rancher-eio/read-vault-secrets@main
23+
uses: rancher-eio/read-vault-secrets@0da85151ad1f19ed7986c41587e45aac1ace74b6 # v3
2424
with:
2525
secrets: |
2626
secret/data/github/org/rancher/fossa/push token | FOSSA_API_KEY_PUSH_ONLY
2727
2828
- name: FOSSA scan
29-
uses: fossas/fossa-action@main
29+
uses: fossas/fossa-action@c414b9ad82eaad041e47a7cf62a4f02411f427a0 # v1.8.0
3030
with:
3131
api-key: ${{ env.FOSSA_API_KEY_PUSH_ONLY }}
3232
# Only runs the scan and do not provide/returns any results back to the

.github/workflows/lint.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,13 +10,13 @@ jobs:
1010
runs-on: ubuntu-latest
1111
steps:
1212
- name: Checkout code
13-
uses: actions/checkout@v5
13+
uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd # v5
1414
- name: Install Go
15-
uses: actions/setup-go@v6
15+
uses: actions/setup-go@4b73464bb391d4059bd26b0524d20df3927bd417 # v6
1616
with:
1717
go-version: 1.25.x
1818
- name: Analysis
19-
uses: golangci/golangci-lint-action@v9.2.0
19+
uses: golangci/golangci-lint-action@1e7e51e771db61008b38414a730f564565cf7c20 # v9.2.0
2020
with:
2121
version: v2.8.0
2222
args: -v

.github/workflows/nightly-publish.yaml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ on:
55
workflow_dispatch:
66
jobs:
77
publish_nightly:
8-
uses: rancher-sandbox/highlander-reusable-workflows/.github/workflows/operator-with-latest-rancher-build.yaml@main
8+
uses: rancher-sandbox/highlander-reusable-workflows/.github/workflows/operator-with-latest-rancher-build.yaml@a8c5ab146fed1a6ba07b5947d045fa05593b8173 # main
99
with:
1010
operator_name: gke-operator
1111
operator_commit: ${{ github.sha }}
@@ -16,9 +16,9 @@ jobs:
1616
runs-on: ubuntu-latest
1717
steps:
1818
- name: Checkout code
19-
uses: actions/checkout@v5
19+
uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd # v5
2020
- name: Login to GHCR registry
21-
uses: docker/login-action@v3
21+
uses: docker/login-action@c94ce9fb468520275223c153574b00df6fe4bcc9 # v3
2222
with:
2323
registry: ghcr.io
2424
username: ${{ github.actor }}
@@ -40,15 +40,15 @@ jobs:
4040
needs: publish_images
4141
steps:
4242
- name: Checkout code
43-
uses: actions/checkout@v5
43+
uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd # v5
4444
- name: Login to GHCR registry
45-
uses: docker/login-action@v3
45+
uses: docker/login-action@c94ce9fb468520275223c153574b00df6fe4bcc9 # v3
4646
with:
4747
registry: ghcr.io
4848
username: ${{ github.actor }}
4949
password: ${{ secrets.GITHUB_TOKEN }}
5050
- name: Install Helm
51-
uses: azure/setup-helm@v4
51+
uses: azure/setup-helm@1a275c3b69536ee54be43f2070a358922e12c8d4 # v4
5252
with:
5353
version: 3.8.0
5454
- name: Set image tag and chart version
@@ -63,4 +63,4 @@ jobs:
6363
- name: Push charts
6464
run: |
6565
helm push bin/rancher-gke-operator-$CHART_VERSION.tgz oci://ghcr.io/${{ github.repository_owner }}/rancher-gke-operator-chart
66-
helm push bin/rancher-gke-operator-crd-$CHART_VERSION.tgz oci://ghcr.io/${{ github.repository_owner }}/rancher-gke-operator-crd-chart
66+
helm push bin/rancher-gke-operator-crd-$CHART_VERSION.tgz oci://ghcr.io/${{ github.repository_owner }}/rancher-gke-operator-crd-chart

.github/workflows/release.yaml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -36,12 +36,12 @@ jobs:
3636
runs-on: ubuntu-latest
3737
steps:
3838
- name: Checkout code
39-
uses: actions/checkout@v5
39+
uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd # v5
4040
with:
4141
fetch-depth: 0
4242
ref: ${{ github.ref_name}}
4343
- name: Read secrets
44-
uses: rancher-eio/read-vault-secrets@main
44+
uses: rancher-eio/read-vault-secrets@0da85151ad1f19ed7986c41587e45aac1ace74b6 # v3
4545
with:
4646
secrets: |
4747
secret/data/github/repo/${{ github.repository }}/dockerhub/${{ github.repository_owner }}/credentials username | PUBLIC_REGISTRY_USERNAME ;
@@ -50,7 +50,7 @@ jobs:
5050
secret/data/github/repo/${{ github.repository }}/rancher-prime-registry/credentials username | PRIME_REGISTRY_USERNAME ;
5151
secret/data/github/repo/${{ github.repository }}/rancher-prime-registry/credentials password | PRIME_REGISTRY_PASSWORD
5252
- name: Publish images
53-
uses: rancher/ecm-distro-tools/actions/publish-image@master
53+
uses: rancher/ecm-distro-tools/actions/publish-image@575bb831c67edd950bfedb59d41dd127bd0005d6 # v0.65.2
5454
with:
5555
image: gke-operator
5656
tag: ${{ github.ref_name }}${{ matrix.tag-suffix }}
@@ -75,7 +75,7 @@ jobs:
7575
needs: publish-images
7676
steps:
7777
- name: Checkout code
78-
uses: actions/checkout@v5
78+
uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd # v5
7979
with:
8080
fetch-depth: 0
8181
ref: ${{ github.ref_name }}
@@ -84,7 +84,7 @@ jobs:
8484
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # required for creating GH release
8585
GORELEASER_CURRENT_TAG: ${{ github.ref_name }} # specify the tag to be released
8686
id: goreleaser
87-
uses: goreleaser/goreleaser-action@v7
87+
uses: goreleaser/goreleaser-action@ec59f474b9834571250b370d4735c50f8e2d1e29 # v7
8888
with:
8989
distribution: goreleaser
9090
version: "~> v2"
@@ -150,13 +150,13 @@ jobs:
150150
if: github.event_name == 'push' && github.ref_type == 'tag'
151151
steps:
152152
- name: Read App Secrets
153-
uses: rancher-eio/read-vault-secrets@main
153+
uses: rancher-eio/read-vault-secrets@0da85151ad1f19ed7986c41587e45aac1ace74b6 # v3
154154
with:
155155
secrets: |
156156
secret/data/github/repo/${{ github.repository }}/github/workflow-dispatcher/app-credentials appId | APP_ID ;
157157
secret/data/github/repo/${{ github.repository }}/github/workflow-dispatcher/app-credentials privateKey | PRIVATE_KEY
158158
- name: Create App Token
159-
uses: actions/create-github-app-token@v1
159+
uses: actions/create-github-app-token@d72941d797fd3113feb6b93fd0dec494b13a2547 # v1
160160
id: app-token
161161
with:
162162
app-id: ${{ env.APP_ID }}

.github/workflows/scan.yaml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,21 +13,21 @@ jobs:
1313
runs-on: ubuntu-latest
1414
steps:
1515
- name: Checkout code
16-
uses: actions/checkout@v5
16+
uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd # v5
1717
with:
1818
fetch-depth: 0
1919
- name: Set up Go
20-
uses: actions/setup-go@v6
20+
uses: actions/setup-go@4b73464bb391d4059bd26b0524d20df3927bd417 # v6
2121
with:
2222
go-version-file: 'go.mod'
2323
check-latest: true
2424
- name: Build operator
2525
run: make operator
2626
- name: Set up Docker Buildx
2727
id: buildx
28-
uses: docker/setup-buildx-action@v3.12.0
28+
uses: docker/setup-buildx-action@8d2750c68a42422c14e847fe6c8ac0403b4cbd6f # v3.12.0
2929
- name: Build image
30-
uses: docker/build-push-action@v6.19.2
30+
uses: docker/build-push-action@10e90e3645eae34f1e60eeb005ba3a3d33f178e8 # v6.19.2
3131
with:
3232
context: .
3333
tags: ghcr.io/rancher/gke-operator:${{ github.sha }}

.github/workflows/unit.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,9 @@ jobs:
77
test:
88
runs-on: ubuntu-latest
99
steps:
10-
- uses: actions/checkout@v5
10+
- uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd # v5
1111
- name: Install Go
12-
uses: actions/setup-go@v6
12+
uses: actions/setup-go@4b73464bb391d4059bd26b0524d20df3927bd417 # v6
1313
with:
1414
go-version: 1.25.x
1515
- name: Run tests

0 commit comments

Comments
 (0)