Skip to content

Commit

Permalink
Update cosign to latest version in release Github action (#958)
Browse files Browse the repository at this point in the history
Signed-off-by: Cosmin Cojocar <[email protected]>
  • Loading branch information
ccojocar authored May 17, 2023
1 parent 8632a8c commit c5ea1b7
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 3 deletions.
6 changes: 4 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:
- name: Install Cosign
uses: sigstore/cosign-installer@v3
with:
cosign-release: 'v1.13.1'
cosign-release: 'v2.0.2'
- name: Store Cosign private key in a file
run: 'echo "$COSIGN_KEY" > /tmp/cosign.key'
shell: bash
Expand Down Expand Up @@ -68,7 +68,9 @@ jobs:
push: true
build-args: GO_VERSION=1.20
- name: Sign Docker Image
run: cosign sign -key /tmp/cosign.key ${TAGS}
run: cosign sign --yes --key /tmp/cosign.key ${TAGS}
env:
TAGS: ${{steps.meta.outputs.tags}}
COSIGN_PASSWORD: ${{secrets.COSIGN_PASSWORD}}
COSIGN_PRIVATE_KEY: /tmp/cosign.key
DIGEST: ${{steps.build-push-action.outputs.digest}}
7 changes: 6 additions & 1 deletion .goreleaser.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,11 @@ builds:
signs:
- cmd: cosign
stdin: '{{ .Env.COSIGN_PASSWORD}}'
args: ["sign-blob", "--key=/tmp/cosign.key", "--output=${signature}", "${artifact}"]
args:
- "sign-blob"
- "--key=/tmp/cosign.key"
- "--output=${signature}"
- "${artifact}"
- "--yes"
artifacts: all

0 comments on commit c5ea1b7

Please sign in to comment.