-
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.
- Loading branch information
Showing
3 changed files
with
45 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
on: | ||
## This workflow only runs on the default branch | ||
check_suite: | ||
types: [completed] | ||
|
||
jobs: | ||
sign: | ||
runs-on: ubuntu-latest | ||
permissions: | ||
contents: read | ||
id-token: write | ||
name: Sign Chart | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@main | ||
with: | ||
fetch-depth: 0 | ||
- name: Install Cosign | ||
uses: sigstore/[email protected] | ||
- name: Check Cosign | ||
run: cosign version | ||
- name: Cosign with OIDC | ||
run: | | ||
# Get the latest tag | ||
LATEST_TAG=$(git describe --tags 'git rev-list --tags --max-count=1') | ||
# Obtain the digest from this tag | ||
DIGEST=$(curl "https://hub.docker.com/v2/repositories/snyk/snyk-universal-broker/tags/${LATEST_TAG}" | jq '.digest' -r) | ||
# Sign the image, using GitHub as an OIDC provider | ||
cosign sign --yes oci://registry-1.docker.io/snyk/snyk-universal-broker-helm@${DIGEST} | ||
- name: Verify signature | ||
run: | | ||
cosign verify oci://registry-1.docker.io/snyk/snyk-universal-broker-helm@${DIGEST} | ||
cosign verify oci://registry-1.docker.io/snyk/snyk-universal-broker-helm@${LATEST_TAG} |
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