-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: add cosign signature via goreleaser (#4)
- Loading branch information
Showing
5 changed files
with
120 additions
and
24 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
#!/bin/bash | ||
|
||
|
||
if [ -z "$1" ]; then | ||
echo "Error: missing articate package as 1st input" | ||
echo "Usage: " | ||
echo " $0 ARTIFACT_PACKAGE TAG" | ||
|
||
exit 1 | ||
|
||
fi | ||
|
||
if [ ! -f "$1" ] ; then | ||
echo "Error: artifcact $1 does not exists" | ||
exit 1 | ||
|
||
fi | ||
|
||
artifcat_path=$1 | ||
artifact=$(basename $artifcat_path) | ||
|
||
if [ -z "$2" ]; then | ||
echo "Error: missing tag as 2nd input" | ||
echo "Usage: " | ||
echo " $0 $1 TAG" | ||
|
||
exit 1 | ||
|
||
fi | ||
|
||
TAG=$2 | ||
|
||
|
||
echo "Checking Signature for version: ${TAG}" | ||
cosign verify-blob \ | ||
--certificate "https://github.com/vdbulcke/hc-vault-util/releases/download/${TAG}/${artifact}.pem" \ | ||
--signature "https://github.com/vdbulcke/hc-vault-util/releases/download/${TAG}/${artifact}.sig" \ | ||
--certificate-oidc-issuer https://token.actions.githubusercontent.com \ | ||
--certificate-identity "https://github.com/vdbulcke/hc-vault-util/.github/workflows/release.yaml@refs/tags/${TAG}" \ | ||
${artifcat_path} |