Skip to content

Commit 0dd53ce

Browse files
Fix image signing on rsyslog image (#151)
* Update cosign action versions * Update cosign step * Change rsyslog image name. Put rsyslog as part of image name not part of tag. Having it as part of the tag confused the image signing. * Add step to sign rsyslog image. Previously the rsyslog image sign step wouldn't work due to the way it was tagged. This has been fixed so add in the step to sign it.
1 parent 4f0f361 commit 0dd53ce

File tree

1 file changed

+20
-4
lines changed

1 file changed

+20
-4
lines changed

.github/workflows/release.yml

Lines changed: 20 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -42,9 +42,9 @@ jobs:
4242
username: ${{ github.actor }}
4343
password: ${{ secrets.GITHUB_TOKEN }}
4444

45-
- uses: sigstore/cosign-installer@v3.1.1
45+
- uses: sigstore/cosign-installer@v3.9.2
4646
with:
47-
cosign-release: "v2.2.1"
47+
cosign-release: "v2.5.3"
4848

4949
- name: Get current date
5050
id: date
@@ -69,7 +69,7 @@ jobs:
6969
context: "./contrib/rsyslog"
7070
push: true
7171
file: ./contrib/rsyslog/Dockerfile.ubuntu
72-
tags: ${{ env.REGISTRY }}/${{ env.APP_IMAGE_NAME }}:${{ github.ref_name }}-rsyslog
72+
tags: ${{ env.REGISTRY }}/${{ env.APP_IMAGE_NAME }}-rsyslog:${{ github.ref_name }}
7373
labels: ${{ steps.rsyslog-metadata.outputs.labels }}
7474

7575
- name: Build and push Docker image
@@ -85,4 +85,20 @@ jobs:
8585
env:
8686
DIGEST: ${{ steps.am-build-push.outputs.digest }}
8787
TAGS: ${{ steps.am-metadata.outputs.tags }}
88-
run: cosign sign -y -r "${TAGS}@${DIGEST}"
88+
run: |
89+
images=""
90+
for tag in ${TAGS}; do
91+
images+="${tag}@${DIGEST} "
92+
done
93+
cosign sign -y -r ${images}
94+
95+
- name: Sign rsyslog container image
96+
env:
97+
DIGEST: ${{ steps.rsyslog-build-push.outputs.digest }}
98+
TAGS: ${{ steps.rsyslog-metadata.outputs.tags }}
99+
run: |
100+
images=""
101+
for tag in ${TAGS}; do
102+
images+="${tag}@${DIGEST} "
103+
done
104+
cosign sign -y -r ${images}

0 commit comments

Comments
 (0)