@@ -33,26 +33,27 @@ jobs:
3333
3434 steps :
3535 - name : Checkout repository
36- uses : actions/checkout@v3
36+ uses : actions/checkout@v4
3737
3838 # Install the cosign tool except on PR
3939 # https://github.com/sigstore/cosign-installer
4040 - name : Install cosign
4141 if : github.event_name != 'pull_request'
42- uses :
sigstore/[email protected] # v2.6.0 43- # with:
44- # cosign-release: 'v1.11.0'
45-
42+ uses : sigstore/cosign-installer@6e04d228eb30da1757ee4e1dd75a0ec73a653e06 # v3.1.1
43+ with :
44+ cosign-release : ' v2.1.1'
4645
47- # Workaround: https://github.com/docker/build-push-action/issues/461
48- - name : Setup Docker buildx
49- uses : docker/setup-buildx-action@79abd3f86f79a9d68a23c75a09a9a85889262adf
46+ # Set up BuildKit Docker container builder to be able to build
47+ # multi-platform images and export cache
48+ # https://github.com/docker/setup-buildx-action
49+ - name : Set up Docker Buildx
50+ uses : docker/setup-buildx-action@f95db51fddba0c2d1ec667646a06c2ce06100226 # v3.0.0
5051
5152 # Login against a Docker registry except on PR
5253 # https://github.com/docker/login-action
5354 - name : Log into registry ${{ env.REGISTRY }}
5455 if : github.event_name != 'pull_request'
55- uses : docker/login-action@28218f9b04b4f3f62068d7b6ce6ca5b26e35336c
56+ uses : docker/login-action@343f7c4344506bcbf9b4de18042ae17996df046d # v3.0.0
5657 with :
5758 registry : ${{ env.REGISTRY }}
5859 username : ${{ github.actor }}
@@ -62,15 +63,15 @@ jobs:
6263 # https://github.com/docker/metadata-action
6364 - name : Extract Docker metadata
6465 id : meta
65- uses : docker/metadata-action@98669ae865ea3cffbcbaa878cf57c20bbf1c6c38
66+ uses : docker/metadata-action@96383f45573cb7f253c731d3b3ab81c87ef81934 # v5.0.0
6667 with :
6768 images : ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
6869
6970 # Build and push Docker image with Buildx (don't push on PR)
7071 # https://github.com/docker/build-push-action
7172 - name : Build and push Docker image
7273 id : build-and-push
73- uses : docker/build-push-action@ac9327eae2b366085ac7f6a2d02df8aa8ead720a
74+ uses : docker/build-push-action@0565240e2d4ab88bba5387d719585280857ece09 # v5.0.0
7475 with :
7576 context : .
7677 push : ${{ github.event_name != 'pull_request' }}
7980 cache-from : type=gha
8081 cache-to : type=gha,mode=max
8182
82-
8383 # Sign the resulting Docker image digest except on PRs.
8484 # This will only write to the public Rekor transparency log when the Docker
8585 # repository is public to avoid leaking data. If you would like to publish
8888 - name : Sign the published Docker image
8989 if : ${{ github.event_name != 'pull_request' }}
9090 env :
91- COSIGN_EXPERIMENTAL : " true"
91+ # https://docs.github.com/en/actions/security-guides/security-hardening-for-github-actions#using-an-intermediate-environment-variable
92+ TAGS : ${{ steps.meta.outputs.tags }}
93+ DIGEST : ${{ steps.build-and-push.outputs.digest }}
9294 # This step uses the identity token to provision an ephemeral certificate
9395 # against the sigstore community Fulcio instance.
94- run : echo "${{ steps.meta.outputs.tags }} " | xargs -I {} cosign sign {}@${{ steps.build-and-push.outputs.digest } }
96+ run : echo "${TAGS} " | xargs -I {} cosign sign --yes {}@${DIGEST }
0 commit comments