@@ -7,7 +7,7 @@ name: Docker
7
7
8
8
on :
9
9
push :
10
- branches : [ "master", "octane" ]
10
+ branches : [ "master","octane" ]
11
11
# Publish semver tags as releases.
12
12
tags : [ 'v*.*.*' ]
13
13
pull_request :
@@ -39,21 +39,18 @@ jobs:
39
39
# https://github.com/sigstore/cosign-installer
40
40
- name : Install cosign
41
41
if : github.event_name != 'pull_request'
42
-
43
- with :
44
- cosign-release : ' v2.2.4' # optional
42
+ uses : sigstore/cosign-installer@v3
43
+
45
44
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
51
48
52
49
# Login against a Docker registry except on PR
53
50
# https://github.com/docker/login-action
54
51
- name : Log into registry ${{ env.REGISTRY }}
55
52
if : github.event_name != 'pull_request'
56
- uses : docker/login-action@343f7c4344506bcbf9b4de18042ae17996df046d # v3.0.0
53
+ uses : docker/login-action@v3
57
54
with :
58
55
registry : ${{ env.REGISTRY }}
59
56
username : ${{ github.actor }}
@@ -63,15 +60,15 @@ jobs:
63
60
# https://github.com/docker/metadata-action
64
61
- name : Extract Docker metadata
65
62
id : meta
66
- uses : docker/metadata-action@96383f45573cb7f253c731d3b3ab81c87ef81934 # v5.0.0
63
+ uses : docker/metadata-action@v5
67
64
with :
68
65
images : ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
69
66
70
67
# Build and push Docker image with Buildx (don't push on PR)
71
68
# https://github.com/docker/build-push-action
72
69
- name : Build and push Docker image
73
70
id : build-and-push
74
- uses : docker/build-push-action@0565240e2d4ab88bba5387d719585280857ece09 # v5.0.0
71
+ uses : docker/build-push-action@v6
75
72
with :
76
73
context : .
77
74
push : ${{ github.event_name != 'pull_request' }}
80
77
cache-from : type=gha
81
78
cache-to : type=gha,mode=max
82
79
80
+
83
81
# Sign the resulting Docker image digest except on PRs.
84
82
# This will only write to the public Rekor transparency log when the Docker
85
83
# repository is public to avoid leaking data. If you would like to publish
88
86
- name : Sign the published Docker image
89
87
if : ${{ github.event_name != 'pull_request' }}
90
88
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"
94
90
# This step uses the identity token to provision an ephemeral certificate
95
91
# 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