@@ -17,64 +17,28 @@ jobs:
1717 permissions :
1818 contents : read
1919 packages : write
20- # This is used to complete the identity challenge
21- # with sigstore/fulcio when running outside of PRs.
22- id-token : write
23-
2420 steps :
2521 - name : Checkout repository
26- uses : actions/checkout@v3
27-
28- # Install the cosign tool except on PR
29- # https://github.com/sigstore/cosign-installer
30- - name : Install cosign
31- if : github.event_name != 'pull_request'
32- uses : sigstore/cosign-installer@1e95c1de343b5b0c23352d6417ee3e48d5bcd422
33- with :
34- cosign-release : ' v1.4.0'
35-
36- # Workaround: https://github.com/docker/build-push-action/issues/461
22+ uses : actions/checkout@v4
3723 - name : Setup Docker buildx
38- uses : docker/setup-buildx-action@79abd3f86f79a9d68a23c75a09a9a85889262adf
39-
40- # Login against a Docker registry except on PR
41- # https://github.com/docker/login-action
24+ uses : docker/setup-buildx-action@v3
4225 - name : Log into registry ${{ env.REGISTRY }}
4326 if : github.event_name != 'pull_request'
44- uses : docker/login-action@28218f9b04b4f3f62068d7b6ce6ca5b26e35336c
27+ uses : docker/login-action@v3
4528 with :
4629 registry : ${{ env.REGISTRY }}
4730 username : ${{ github.actor }}
4831 password : ${{ secrets.GITHUB_TOKEN }}
49-
50- # Extract metadata (tags, labels) for Docker
51- # https://github.com/docker/metadata-action
5232 - name : Extract Docker metadata
5333 id : meta
54- uses : docker/metadata-action@98669ae865ea3cffbcbaa878cf57c20bbf1c6c38
34+ uses : docker/metadata-action@v5
5535 with :
5636 images : ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
57-
58- # Build and push Docker image with Buildx (don't push on PR)
59- # https://github.com/docker/build-push-action
6037 - name : Build and push Docker image
6138 id : build-and-push
62- uses : docker/build-push-action@ad44023a93711e3deb337508980b4b5e9bcdc5dc
39+ uses : docker/build-push-action@v5
6340 with :
6441 context : .
6542 push : ${{ github.event_name != 'pull_request' }}
6643 tags : ${{ steps.meta.outputs.tags }}
6744 labels : ${{ steps.meta.outputs.labels }}
68-
69- # Sign the resulting Docker image digest except on PRs.
70- # This will only write to the public Rekor transparency log when the Docker
71- # repository is public to avoid leaking data. If you would like to publish
72- # transparency data even for private images, pass --force to cosign below.
73- # https://github.com/sigstore/cosign
74- - name : Sign the published Docker image
75- if : ${{ github.event_name != 'pull_request' }}
76- env :
77- COSIGN_EXPERIMENTAL : " true"
78- # This step uses the identity token to provision an ephemeral certificate
79- # against the sigstore community Fulcio instance.
80- run : cosign sign ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}@${{ steps.build-and-push.outputs.digest }}
0 commit comments