@@ -38,19 +38,21 @@ jobs:
3838 # https://github.com/sigstore/cosign-installer
3939 - name : Install cosign
4040 if : github.event_name != 'pull_request'
41- uses : sigstore/cosign-installer@f3c664df7af409cb4873aa5068053ba9d61a57b6 # v2.6.0
41+ uses : sigstore/cosign-installer@6e04d228eb30da1757ee4e1dd75a0ec73a653e06 # v3.1.1
4242 with :
43- cosign-release : ' v1.13 .1'
43+ cosign-release : ' v2.1 .1'
4444
45- # Workaround: https://github.com/docker/build-push-action/issues/461
46- - name : Setup Docker buildx
47- uses : docker/setup-buildx-action@79abd3f86f79a9d68a23c75a09a9a85889262adf
45+ # Set up BuildKit Docker container builder to be able to build
46+ # multi-platform images and export cache
47+ # https://github.com/docker/setup-buildx-action
48+ - name : Set up Docker Buildx
49+ uses : docker/setup-buildx-action@f95db51fddba0c2d1ec667646a06c2ce06100226 # v3.0.0
4850
4951 # Login against a Docker registry except on PR
5052 # https://github.com/docker/login-action
5153 - name : Log into registry ${{ env.REGISTRY }}
5254 if : github.event_name != 'pull_request'
53- uses : docker/login-action@28218f9b04b4f3f62068d7b6ce6ca5b26e35336c
55+ uses : docker/login-action@343f7c4344506bcbf9b4de18042ae17996df046d # v3.0.0
5456 with :
5557 registry : ${{ env.REGISTRY }}
5658 username : ${{ github.actor }}
@@ -60,15 +62,15 @@ jobs:
6062 # https://github.com/docker/metadata-action
6163 - name : Extract Docker metadata
6264 id : meta
63- uses : docker/metadata-action@98669ae865ea3cffbcbaa878cf57c20bbf1c6c38
65+ uses : docker/metadata-action@96383f45573cb7f253c731d3b3ab81c87ef81934 # v5.0.0
6466 with :
6567 images : ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
6668
6769 # Build and push Docker image with Buildx (don't push on PR)
6870 # https://github.com/docker/build-push-action
6971 - name : Build and push Docker image
7072 id : build-and-push
71- uses : docker/build-push-action@ac9327eae2b366085ac7f6a2d02df8aa8ead720a
73+ uses : docker/build-push-action@0565240e2d4ab88bba5387d719585280857ece09 # v5.0.0
7274 with :
7375 context : .
7476 push : ${{ github.event_name != 'pull_request' }}
8587 - name : Sign the published Docker image
8688 if : ${{ github.event_name != 'pull_request' }}
8789 env :
88- COSIGN_EXPERIMENTAL : " true"
90+ # https://docs.github.com/en/actions/security-guides/security-hardening-for-github-actions#using-an-intermediate-environment-variable
91+ TAGS : ${{ steps.meta.outputs.tags }}
92+ DIGEST : ${{ steps.build-and-push.outputs.digest }}
8993 # This step uses the identity token to provision an ephemeral certificate
9094 # against the sigstore community Fulcio instance.
91- run : echo "${{ steps.meta.outputs.tags }} " | xargs -I {} cosign sign {}@${{ steps.build-and-push.outputs.digest } }
95+ run : echo "${TAGS} " | xargs -I {} cosign sign --yes {}@${DIGEST }
0 commit comments