Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 11 additions & 7 deletions .github/workflows/docker-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ jobs:
if: github.event_name != 'pull_request'
uses: sigstore/cosign-installer@6f9f17788090df1f26f669e9d70d6ae9567deba6 #v4.1.2
with:
cosign-release: "v2.6.5"
cosign-release: "v3.1.3"

# Set up BuildKit Docker container builder to be able to build
# multi-platform images and export cache
Expand Down Expand Up @@ -122,16 +122,20 @@ jobs:
oauth_client_secret=${{ secrets.OAUTH_CLIENT_SECRET }}

# Sign the resulting Docker image digest except on PRs.
# This will only write to the public Rekor transparency log when the Docker
# repository is public to avoid leaking data. If you would like to publish
# transparency data even for private images, pass --force to cosign below.
# Publish both v2-compatible .sig tags and native Sigstore bundles.
# --yes also consents to publishing signing metadata to the public log.
# https://github.com/sigstore/cosign
- name: Sign the published Docker image
- name: Sign the published Docker image (legacy)
if: ${{ github.event_name != 'pull_request' }}
env:
# https://docs.github.com/en/actions/security-guides/security-hardening-for-github-actions#using-an-intermediate-environment-variable
TAGS: ${{ steps.meta.outputs.tags }}
DIGEST: ${{ steps.build-and-push.outputs.digest }}
# This step uses the identity token to provision an ephemeral certificate
# against the sigstore community Fulcio instance.
run: echo "${TAGS}" | xargs -I {} cosign sign --yes {}@${DIGEST}
run: cosign sign --yes --new-bundle-format=false --use-signing-config=false --registry-referrers-mode=legacy "${REGISTRY}/${IMAGE_NAME}@${DIGEST}"

- name: Sign the published Docker image (native bundle)
if: ${{ github.event_name != 'pull_request' }}
env:
DIGEST: ${{ steps.build-and-push.outputs.digest }}
run: cosign sign --yes "${REGISTRY}/${IMAGE_NAME}@${DIGEST}"
Loading