@@ -7,7 +7,7 @@ name: Docker
77
88on :
99 push :
10- branches : [ "master", "octane" ]
10+ branches : [ "master","octane" ]
1111 # Publish semver tags as releases.
1212 tags : [ 'v*.*.*' ]
1313 pull_request :
@@ -39,21 +39,18 @@ jobs:
3939 # https://github.com/sigstore/cosign-installer
4040 - name : Install cosign
4141 if : github.event_name != 'pull_request'
42- 43- with :
44- cosign-release : ' v2.2.4' # optional
42+ uses : sigstore/cosign-installer@v3
43+
4544
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
45+ # Workaround: https://github.com/docker/build-push-action/issues/461
46+ - name : Setup Docker buildx
47+ uses : docker/setup-buildx-action@v3
5148
5249 # Login against a Docker registry except on PR
5350 # https://github.com/docker/login-action
5451 - name : Log into registry ${{ env.REGISTRY }}
5552 if : github.event_name != 'pull_request'
56- uses : docker/login-action@343f7c4344506bcbf9b4de18042ae17996df046d # v3.0.0
53+ uses : docker/login-action@v3
5754 with :
5855 registry : ${{ env.REGISTRY }}
5956 username : ${{ github.actor }}
@@ -63,15 +60,15 @@ jobs:
6360 # https://github.com/docker/metadata-action
6461 - name : Extract Docker metadata
6562 id : meta
66- uses : docker/metadata-action@96383f45573cb7f253c731d3b3ab81c87ef81934 # v5.0.0
63+ uses : docker/metadata-action@v5
6764 with :
6865 images : ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
6966
7067 # Build and push Docker image with Buildx (don't push on PR)
7168 # https://github.com/docker/build-push-action
7269 - name : Build and push Docker image
7370 id : build-and-push
74- uses : docker/build-push-action@0565240e2d4ab88bba5387d719585280857ece09 # v5.0.0
71+ uses : docker/build-push-action@v6
7572 with :
7673 context : .
7774 push : ${{ github.event_name != 'pull_request' }}
8077 cache-from : type=gha
8178 cache-to : type=gha,mode=max
8279
80+
8381 # Sign the resulting Docker image digest except on PRs.
8482 # This will only write to the public Rekor transparency log when the Docker
8583 # repository is public to avoid leaking data. If you would like to publish
8886 - name : Sign the published Docker image
8987 if : ${{ github.event_name != 'pull_request' }}
9088 env :
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 }}
89+ COSIGN_EXPERIMENTAL : " true"
9490 # This step uses the identity token to provision an ephemeral certificate
9591 # against the sigstore community Fulcio instance.
96- run : echo "${TAGS} " | xargs -I {} cosign sign --yes {}@${DIGEST }
92+ run : echo "${{ steps.meta.outputs.tags }} " | xargs -I {} cosign sign {}@${{ steps.build-and-push.outputs.digest } }
0 commit comments