Skip to content

Commit 9ae0b09

Browse files
chore(ci): pin all actions to commit hash and comment with version and release link (#410)
1 parent 2b838ce commit 9ae0b09

File tree

5 files changed

+32
-32
lines changed

5 files changed

+32
-32
lines changed

.github/workflows/ci-docker.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,18 +15,18 @@ jobs:
1515
docker:
1616
runs-on: ubuntu-latest
1717
steps:
18-
- uses: actions/checkout@v4
18+
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 https://github.com/actions/checkout/releases/tag/v4.2.2
1919
with:
2020
fetch-depth: '0'
2121
- name: qemu
22-
uses: docker/setup-qemu-action@v3
23-
- uses: docker/setup-buildx-action@v3
22+
uses: docker/setup-qemu-action@29109295f81e9208d7d86ff1c6c12d2833863392 # v3.6.0 https://github.com/docker/setup-qemu-action/releases/tag/v3.6.0
23+
- uses: docker/setup-buildx-action@b5ca514318bd6ebac0fb2aedd5d36ec1b5c232a2 # v3.10.0 https://github.com/docker/setup-buildx-action/releases/tag/v3.10.0
2424
- id: meta
25-
uses: docker/metadata-action@v5
25+
uses: docker/metadata-action@902fa8ec7d6ecbf8d84d538b9b233a880e428804 # v5.7.0 https://github.com/docker/metadata-action/releases/tag/v5.7.0
2626
with:
2727
images: ${{ env.GHCR_IMAGE_NAME }}
2828
- name: build
29-
uses: docker/build-push-action@v6
29+
uses: docker/build-push-action@14487ce63c7a62a4a324b0bfb37086795e31c6c1 # v6.16.0 https://github.com/docker/build-push-action/releases/tag/v6.16.0
3030
with:
3131
context: .
3232
push: false

.github/workflows/conventional-commits.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,5 +13,5 @@ jobs:
1313
permissions:
1414
contents: read
1515
steps:
16-
- uses: actions/checkout@v4
17-
- uses: webiny/[email protected]
16+
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 https://github.com/actions/checkout/releases/tag/v4.2.2
17+
- uses: webiny/action-conventional-commits@8bc41ff4e7d423d56fa4905f6ff79209a78776c7 # v1.3.0 https://github.com/webiny/action-conventional-commits/releases/tag/v1.3.0

.github/workflows/go-test.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,8 @@ jobs:
2020
platform: [ubuntu-latest]
2121
runs-on: ${{ matrix.platform }}
2222
steps:
23-
- uses: actions/checkout@v4
24-
- uses: actions/setup-go@v5
23+
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 https://github.com/actions/checkout/releases/tag/v4.2.2
24+
- uses: actions/setup-go@0aaccfd150d50ccaeb58ebd88d36e91967a5f35b # v5.4.0 https://github.com/actions/setup-go/releases/tag/v5.4.0
2525
with:
2626
go-version: ${{ matrix.go-version }}
2727
- name: go-test

.github/workflows/golangci-lint.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,9 @@ jobs:
1515
name: lint
1616
runs-on: ubuntu-latest
1717
steps:
18-
- uses: actions/checkout@v4
19-
- uses: actions/setup-go@v5
18+
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 https://github.com/actions/checkout/releases/tag/v4.2.2
19+
- uses: actions/setup-go@0aaccfd150d50ccaeb58ebd88d36e91967a5f35b # v5.4.0 https://github.com/actions/setup-go/releases/tag/v5.4.0
2020
with:
2121
go-version: 1.23.x
2222
- name: golangci-lint
23-
uses: golangci/golangci-lint-action@v7
23+
uses: golangci/golangci-lint-action@1481404843c368bc19ca9406f87d6e0fc97bdcfd # v7.0.0 https://github.com/golangci/golangci-lint-action/releases/tag/v7.0.0

.github/workflows/publish.yml

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ jobs:
2020
RELEASE_ID: ${{ steps.create-release.outputs.result }}
2121
steps:
2222
- run: "echo \"RELEASE_TAG=${GITHUB_REF#refs/tags/}\" >> $GITHUB_ENV"
23-
- uses: actions/github-script@v7
23+
- uses: actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea # v7.0.1 https://github.com/actions/github-script/releases/tag/v7.0.1
2424
id: create-release
2525
if: startsWith(github.ref, 'refs/tags/')
2626
with:
@@ -88,10 +88,10 @@ jobs:
8888
- name: Set RELEASE_TAG
8989
if: matrix.os != 'windows'
9090
run: "echo \"RELEASE_TAG=${GITHUB_REF#refs/tags/}\" >> $GITHUB_ENV"
91-
- uses: actions/checkout@v4
91+
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 https://github.com/actions/checkout/releases/tag/v4.2.2
9292
with:
9393
fetch-depth: '0'
94-
- uses: actions/setup-go@v5
94+
- uses: actions/setup-go@0aaccfd150d50ccaeb58ebd88d36e91967a5f35b # v5.4.0 https://github.com/actions/setup-go/releases/tag/v5.4.0
9595
with:
9696
go-version: 1.23.x
9797
- name: Build binary (Windows)
@@ -107,20 +107,20 @@ jobs:
107107

108108
# Sign Windows build
109109
- name: Set up Java
110-
uses: actions/setup-java@v4
110+
uses: actions/setup-java@c5195efecf7bdfc987ee8bae7a71cb8b11521c00 # v4.7.1 https://github.com/actions/setup-java/releases/tag/v4.7.1
111111
if: ${{ startsWith(github.ref, 'refs/tags/') && matrix.os == 'windows' }}
112112
with:
113113
java-version: 17
114114
distribution: 'temurin'
115115
- id: 'auth'
116116
name: Authenticate with Google Cloud
117117
if: ${{ startsWith(github.ref, 'refs/tags/') && matrix.os == 'windows' }}
118-
uses: 'google-github-actions/auth@v2'
118+
uses: google-github-actions/auth@ba79af03959ebeac9769e648f473a284504d9193 # v2.1.10 https://github.com/google-github-actions/auth/releases/tag/v2.1.10
119119
with:
120120
credentials_json: '${{ secrets.CERTIFICATE_SA_CREDENTIALS }}'
121121
- name: Set up Cloud SDK
122122
if: ${{ startsWith(github.ref, 'refs/tags/') && matrix.os == 'windows' }}
123-
uses: 'google-github-actions/setup-gcloud@v2'
123+
uses: google-github-actions/setup-gcloud@77e7a554d41e2ee56fc945c52dfd3f33d12def9a # v2.1.4 https://github.com/google-github-actions/setup-gcloud/releases/tag/v2.1.4
124124
- name: Sign binary (Windows)
125125
if: ${{ startsWith(github.ref, 'refs/tags/') && matrix.os == 'windows' }}
126126
shell: pwsh
@@ -242,13 +242,13 @@ jobs:
242242
243243
- name: Attest binary (Windows)
244244
if: startsWith(github.ref, 'refs/tags/') && matrix.os == 'windows'
245-
uses: actions/attest-build-provenance@v2
245+
uses: actions/attest-build-provenance@db473fddc028af60658334401dc6fa3ffd8669fd # v2.3.0 https://github.com/actions/attest-build-provenance/releases/tag/v2.3.0
246246
with:
247247
subject-path: '${{ env.APPLICATION_NAME }}.exe'
248248

249249
- name: Attest binary
250250
if: startsWith(github.ref, 'refs/tags/') && matrix.os != 'windows'
251-
uses: actions/attest-build-provenance@v2
251+
uses: actions/attest-build-provenance@db473fddc028af60658334401dc6fa3ffd8669fd # v2.3.0 https://github.com/actions/attest-build-provenance/releases/tag/v2.3.0
252252
with:
253253
subject-path: '${{ env.APPLICATION_NAME }}'
254254

@@ -265,26 +265,26 @@ jobs:
265265
statuses: write
266266
steps:
267267
- run: "echo \"RELEASE_TAG=${GITHUB_REF#refs/tags/}\" >> $GITHUB_ENV"
268-
- uses: actions/checkout@v4
268+
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 https://github.com/actions/checkout/releases/tag/v4.2.2
269269
with:
270270
fetch-depth: '0'
271271
- name: Set up QEMU
272-
uses: docker/setup-qemu-action@v3
272+
uses: docker/setup-qemu-action@29109295f81e9208d7d86ff1c6c12d2833863392 # v3.6.0 https://github.com/docker/setup-qemu-action/releases/tag/v3.6.0
273273
- name: Set up Docker Buildx
274-
uses: docker/setup-buildx-action@v3
274+
uses: docker/setup-buildx-action@b5ca514318bd6ebac0fb2aedd5d36ec1b5c232a2 # v3.10.0 https://github.com/docker/setup-buildx-action/releases/tag/v3.10.0
275275
- name: Login to Docker Hub
276-
uses: docker/login-action@v3
276+
uses: docker/login-action@74a5d142397b4f367a81961eba4e8cd7edddf772 # v3.4.0 https://github.com/docker/login-action/releases/tag/v3.4.0
277277
with:
278278
username: blinklabs
279279
password: ${{ secrets.DOCKER_PASSWORD }} # uses token
280280
- name: Login to GHCR
281-
uses: docker/login-action@v3
281+
uses: docker/login-action@74a5d142397b4f367a81961eba4e8cd7edddf772 # v3.4.0 https://github.com/docker/login-action/releases/tag/v3.4.0
282282
with:
283283
username: ${{ github.repository_owner }}
284284
password: ${{ secrets.GITHUB_TOKEN }}
285285
registry: ghcr.io
286286
- id: meta
287-
uses: docker/metadata-action@v5
287+
uses: docker/metadata-action@902fa8ec7d6ecbf8d84d538b9b233a880e428804 # v5.7.0 https://github.com/docker/metadata-action/releases/tag/v5.7.0
288288
with:
289289
images: |
290290
blinklabs/adder
@@ -298,27 +298,27 @@ jobs:
298298
type=semver,pattern={{version}}
299299
- name: Build images
300300
id: push
301-
uses: docker/build-push-action@v6
301+
uses: docker/build-push-action@14487ce63c7a62a4a324b0bfb37086795e31c6c1 # v6.16.0 https://github.com/docker/build-push-action/releases/tag/v6.16.0
302302
with:
303303
outputs: "type=registry,push=true"
304304
platforms: linux/amd64,linux/arm64
305305
tags: ${{ steps.meta.outputs.tags }}
306306
labels: ${{ steps.meta.outputs.labels }}
307307
- name: Attest Docker Hub image
308-
uses: actions/attest-build-provenance@v2
308+
uses: actions/attest-build-provenance@db473fddc028af60658334401dc6fa3ffd8669fd # v2.3.0 https://github.com/actions/attest-build-provenance/releases/tag/v2.3.0
309309
with:
310310
subject-name: index.docker.io/blinklabs/adder
311311
subject-digest: ${{ steps.push.outputs.digest }}
312312
push-to-registry: true
313313
- name: Attest GHCR image
314-
uses: actions/attest-build-provenance@v2
314+
uses: actions/attest-build-provenance@db473fddc028af60658334401dc6fa3ffd8669fd # v2.3.0 https://github.com/actions/attest-build-provenance/releases/tag/v2.3.0
315315
with:
316316
subject-name: ghcr.io/${{ github.repository }}
317317
subject-digest: ${{ steps.push.outputs.digest }}
318318
push-to-registry: true
319319
# Update Docker Hub from README
320320
- name: Docker Hub Description
321-
uses: peter-evans/dockerhub-description@v4
321+
uses: peter-evans/dockerhub-description@432a30c9e07499fd01da9f8a49f0faf9e0ca5b77 # v4.0.2 https://github.com/peter-evans/dockerhub-description/releases/tag/v4.0.2
322322
with:
323323
username: blinklabs
324324
password: ${{ secrets.DOCKER_PASSWORD }}
@@ -332,7 +332,7 @@ jobs:
332332
contents: write
333333
needs: [create-draft-release, build-binaries, build-images]
334334
steps:
335-
- uses: actions/github-script@v7
335+
- uses: actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea # v7.0.1 https://github.com/actions/github-script/releases/tag/v7.0.1
336336
if: startsWith(github.ref, 'refs/tags/')
337337
with:
338338
github-token: ${{ secrets.GITHUB_TOKEN }}
@@ -350,4 +350,4 @@ jobs:
350350
# This updates the documentation on pkg.go.dev and the latest version available via the Go module proxy
351351
- name: Pull new module version
352352
if: startsWith(github.ref, 'refs/tags/')
353-
uses: andrewslotin/[email protected]
353+
uses: andrewslotin/go-proxy-pull-action@0ef95ea50ab6c03f2f095a5102bbdecad8fd7602 # v1.3.0 https://github.com/andrewslotin/go-proxy-pull-action/releases/tag/v1.3.0

0 commit comments

Comments
 (0)