Skip to content

Commit c5ea1b7

Browse files
authored
Update cosign to latest version in release Github action (#958)
Signed-off-by: Cosmin Cojocar <[email protected]>
1 parent 8632a8c commit c5ea1b7

File tree

2 files changed

+10
-3
lines changed

2 files changed

+10
-3
lines changed

.github/workflows/release.yml

+4-2
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ jobs:
2121
- name: Install Cosign
2222
uses: sigstore/cosign-installer@v3
2323
with:
24-
cosign-release: 'v1.13.1'
24+
cosign-release: 'v2.0.2'
2525
- name: Store Cosign private key in a file
2626
run: 'echo "$COSIGN_KEY" > /tmp/cosign.key'
2727
shell: bash
@@ -68,7 +68,9 @@ jobs:
6868
push: true
6969
build-args: GO_VERSION=1.20
7070
- name: Sign Docker Image
71-
run: cosign sign -key /tmp/cosign.key ${TAGS}
71+
run: cosign sign --yes --key /tmp/cosign.key ${TAGS}
7272
env:
7373
TAGS: ${{steps.meta.outputs.tags}}
7474
COSIGN_PASSWORD: ${{secrets.COSIGN_PASSWORD}}
75+
COSIGN_PRIVATE_KEY: /tmp/cosign.key
76+
DIGEST: ${{steps.build-push-action.outputs.digest}}

.goreleaser.yml

+6-1
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,11 @@ builds:
2626
signs:
2727
- cmd: cosign
2828
stdin: '{{ .Env.COSIGN_PASSWORD}}'
29-
args: ["sign-blob", "--key=/tmp/cosign.key", "--output=${signature}", "${artifact}"]
29+
args:
30+
- "sign-blob"
31+
- "--key=/tmp/cosign.key"
32+
- "--output=${signature}"
33+
- "${artifact}"
34+
- "--yes"
3035
artifacts: all
3136

0 commit comments

Comments
 (0)