@@ -17,64 +17,28 @@ jobs:
17
17
permissions :
18
18
contents : read
19
19
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
-
24
20
steps :
25
21
- 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
37
23
- 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
42
25
- name : Log into registry ${{ env.REGISTRY }}
43
26
if : github.event_name != 'pull_request'
44
- uses : docker/login-action@28218f9b04b4f3f62068d7b6ce6ca5b26e35336c
27
+ uses : docker/login-action@v3
45
28
with :
46
29
registry : ${{ env.REGISTRY }}
47
30
username : ${{ github.actor }}
48
31
password : ${{ secrets.GITHUB_TOKEN }}
49
-
50
- # Extract metadata (tags, labels) for Docker
51
- # https://github.com/docker/metadata-action
52
32
- name : Extract Docker metadata
53
33
id : meta
54
- uses : docker/metadata-action@98669ae865ea3cffbcbaa878cf57c20bbf1c6c38
34
+ uses : docker/metadata-action@v5
55
35
with :
56
36
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
60
37
- name : Build and push Docker image
61
38
id : build-and-push
62
- uses : docker/build-push-action@ad44023a93711e3deb337508980b4b5e9bcdc5dc
39
+ uses : docker/build-push-action@v5
63
40
with :
64
41
context : .
65
42
push : ${{ github.event_name != 'pull_request' }}
66
43
tags : ${{ steps.meta.outputs.tags }}
67
44
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