@@ -7,7 +7,7 @@ name: Docker
7
7
8
8
on :
9
9
schedule :
10
- - cron : ' 37 16 * * *'
10
+ - cron : ' 44 1 * * *'
11
11
push :
12
12
branches : [ "master" ]
13
13
# Publish semver tags as releases.
@@ -41,20 +41,21 @@ jobs:
41
41
# https://github.com/sigstore/cosign-installer
42
42
- name : Install cosign
43
43
if : github.event_name != 'pull_request'
44
- uses : sigstore/cosign-installer@v3.3.0
44
+ uses : sigstore/cosign-installer@6e04d228eb30da1757ee4e1dd75a0ec73a653e06 # v3.1.1
45
45
with :
46
- cosign-release : ' v2.2.2 '
46
+ cosign-release : ' v2.1.1 '
47
47
48
-
49
- # Workaround: https://github.com/docker/build-push-action/issues/461
50
- - name : Setup Docker buildx
51
- uses : docker/setup-buildx-action@79abd3f86f79a9d68a23c75a09a9a85889262adf
48
+ # Set up BuildKit Docker container builder to be able to build
49
+ # multi-platform images and export cache
50
+ # https://github.com/docker/setup-buildx-action
51
+ - name : Set up Docker Buildx
52
+ uses : docker/setup-buildx-action@f95db51fddba0c2d1ec667646a06c2ce06100226 # v3.0.0
52
53
53
54
# Login against a Docker registry except on PR
54
55
# https://github.com/docker/login-action
55
56
- name : Log into registry ${{ env.REGISTRY }}
56
57
if : github.event_name != 'pull_request'
57
- uses : docker/login-action@28218f9b04b4f3f62068d7b6ce6ca5b26e35336c
58
+ uses : docker/login-action@343f7c4344506bcbf9b4de18042ae17996df046d # v3.0.0
58
59
with :
59
60
registry : ${{ env.REGISTRY }}
60
61
username : ${{ github.actor }}
@@ -64,15 +65,15 @@ jobs:
64
65
# https://github.com/docker/metadata-action
65
66
- name : Extract Docker metadata
66
67
id : meta
67
- uses : docker/metadata-action@98669ae865ea3cffbcbaa878cf57c20bbf1c6c38
68
+ uses : docker/metadata-action@96383f45573cb7f253c731d3b3ab81c87ef81934 # v5.0.0
68
69
with :
69
70
images : ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
70
71
71
72
# Build and push Docker image with Buildx (don't push on PR)
72
73
# https://github.com/docker/build-push-action
73
74
- name : Build and push Docker image
74
75
id : build-and-push
75
- uses : docker/build-push-action@ac9327eae2b366085ac7f6a2d02df8aa8ead720a
76
+ uses : docker/build-push-action@0565240e2d4ab88bba5387d719585280857ece09 # v5.0.0
76
77
with :
77
78
context : .
78
79
push : ${{ github.event_name != 'pull_request' }}
93
94
- name : Sign the published Docker image
94
95
if : ${{ github.event_name != 'pull_request' }}
95
96
env :
96
- COSIGN_EXPERIMENTAL : " true"
97
+ # https://docs.github.com/en/actions/security-guides/security-hardening-for-github-actions#using-an-intermediate-environment-variable
98
+ TAGS : ${{ steps.meta.outputs.tags }}
99
+ DIGEST : ${{ steps.build-and-push.outputs.digest }}
97
100
# This step uses the identity token to provision an ephemeral certificate
98
101
# against the sigstore community Fulcio instance.
99
- run : echo "${{ steps.meta.outputs.tags }} " | xargs -I {} cosign sign {}@${{ steps.build-and-push.outputs.digest } }
102
+ run : echo "${TAGS} " | xargs -I {} cosign sign --yes {}@${DIGEST }
0 commit comments