Commit cfe4706 1 parent ca10223 commit cfe4706 Copy full SHA for cfe4706
File tree 4 files changed +49
-0
lines changed
4 files changed +49
-0
lines changed Original file line number Diff line number Diff line change @@ -38,13 +38,21 @@ inputs:
38
38
password :
39
39
description : ' OCI Registry Password'
40
40
required : true
41
+ sign :
42
+ description : ' Sign images?'
43
+ required : false
44
+ default : false
41
45
42
46
runs :
43
47
using : " composite"
44
48
steps :
45
49
- name : Set up QEMU
46
50
uses : docker/setup-qemu-action@v3
47
51
52
+ - name : Install cosign
53
+ if : inputs.sign != 'false'
54
+ uses : sigstore/cosign-installer@v3.5.0
55
+
48
56
- name : Set up Docker Buildx
49
57
uses : docker/setup-buildx-action@v3
50
58
80
88
${{ inputs.repository }}:v${{ inputs.semver_major }}
81
89
platforms : ${{ inputs.platforms }}
82
90
91
+ - name : Sign the published images
92
+ if : inputs.sign == 'true' && inputs.push == 'true'
93
+ shell : bash
94
+ env :
95
+ TAGS : |
96
+ ${{ inputs.repository }}:latest
97
+ ${{ inputs.repository }}:${{ steps.git.outputs.short_sha }}
98
+ ${{ inputs.repository }}:v${{ inputs.semver_major }}.${{ inputs.semver_minor }}.${{ inputs.semver_patch }}
99
+ ${{ inputs.repository }}:v${{ inputs.semver_major }}.${{ inputs.semver_minor }}
100
+ ${{ inputs.repository }}:v${{ inputs.semver_major }}
101
+ DIGEST : ${{ steps.build.outputs.digest }}
102
+ run : echo "${TAGS}" | xargs -I {} cosign sign --yes {}@${DIGEST}
103
+
83
104
- name : Attest
84
105
uses : actions/attest-build-provenance@v1
85
106
id : attest
Original file line number Diff line number Diff line change @@ -43,13 +43,21 @@ inputs:
43
43
description : ' Cleanup images after build?'
44
44
required : true
45
45
default : true
46
+ sign :
47
+ description : ' Sign images?'
48
+ required : false
49
+ default : false
46
50
47
51
runs :
48
52
using : " composite"
49
53
steps :
50
54
- name : Set up QEMU
51
55
uses : docker/setup-qemu-action@v3
52
56
57
+ - name : Install cosign
58
+ if : inputs.sign != 'false'
59
+ uses : sigstore/cosign-installer@v3.5.0
60
+
53
61
- name : Set up Docker Buildx
54
62
uses : docker/setup-buildx-action@v3
55
63
@@ -144,6 +152,19 @@ runs:
144
152
docker push ${{ inputs.repository }}:v${{ inputs.semver_major }}.${{ inputs.semver_minor }}
145
153
docker push ${{ inputs.repository }}:v${{ inputs.semver_major }}
146
154
155
+ - name : Sign the published images
156
+ if : inputs.sign == 'true' && inputs.push == 'true'
157
+ shell : bash
158
+ env :
159
+ TAGS : |
160
+ ${{ inputs.repository }}:latest
161
+ ${{ inputs.repository }}:${{ steps.git.outputs.short_sha }}
162
+ ${{ inputs.repository }}:v${{ inputs.semver_major }}.${{ inputs.semver_minor }}.${{ inputs.semver_patch }}
163
+ ${{ inputs.repository }}:v${{ inputs.semver_major }}.${{ inputs.semver_minor }}
164
+ ${{ inputs.repository }}:v${{ inputs.semver_major }}
165
+ DIGEST : ${{ steps.tag.outputs.digest }}
166
+ run : echo "${TAGS}" | xargs -I {} cosign sign --yes {}@${DIGEST}
167
+
147
168
# jscpd:ignore-start
148
169
- name : Attest
149
170
uses : actions/attest-build-provenance@v1
Original file line number Diff line number Diff line change 9
9
- ' !devcontainers/janus/CHANGELOG.md'
10
10
- ' .devcontainer/**'
11
11
- ' !.devcontainer/CHANGELOG.md'
12
+ - ' .github/workflows/containers.yml'
13
+ - ' .github/actions/container/**'
14
+ - ' .github/actions/devcontainer/**'
12
15
13
16
concurrency :
14
17
group : ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
57
60
context : " {{defaultContext}}:containers/janus"
58
61
platforms : linux/amd64,linux/arm64
59
62
push : true
63
+ sign : true
60
64
repository : ghcr.io/jhatler/janus
61
65
registry : ghcr.io
62
66
username : ${{ github.repository_owner }}
@@ -107,6 +111,7 @@ jobs:
107
111
workspace : ${{ github.workspace }}/devcontainers/janus
108
112
platforms : linux/amd64,linux/arm64
109
113
push : true
114
+ sign : true
110
115
repository : ghcr.io/jhatler/janus-devcontainer
111
116
registry : ghcr.io
112
117
username : ${{ github.repository_owner }}
Original file line number Diff line number Diff line change 36
36
context : " {{defaultContext}}:containers/janus"
37
37
platforms : linux/amd64
38
38
push : true
39
+ sign : true
39
40
repository : ghcr.io/jhatler/janus
40
41
registry : ghcr.io
41
42
username : ${{ github.repository_owner }}
53
54
workspace : ${{ github.workspace }}/devcontainers/janus
54
55
platforms : linux/amd64
55
56
push : true
57
+ sign : true
56
58
repository : ghcr.io/jhatler/janus-devcontainer
57
59
registry : ghcr.io
58
60
username : ${{ github.repository_owner }}
You can’t perform that action at this time.
0 commit comments