-
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
1 changed file
with
6 additions
and
5 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -27,13 +27,14 @@ jobs: | |
uses: sigstore/[email protected] | ||
- name: Check Cosign | ||
run: cosign version | ||
- name: Cosign with OIDC | ||
- name: Get latest tag | ||
run: echo "LATEST_TAG=$(git describe --tags `git rev-list --tags --max-count=1` | tr -d 'v')" >> $GITHUB_ENV | ||
- name: Get digest | ||
run: | | ||
# Get the latest tag | ||
LATEST_TAG=$(git describe --tags `git rev-list --tags --max-count=1` | tr -d 'v') | ||
# 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 | ||
echo "DIGEST=${DIGEST}" >> $GITHUB_ENV | ||
- name: Cosign with OIDC | ||
run: | | ||
cosign sign --yes snyk/snyk-universal-broker@${DIGEST} | ||
cosign sign --yes snyk/snyk-universal-broker:${LATEST_TAG} | ||
- name: Verify signature | ||
|