Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use latest cosign action to fix signing issue on docker publish #1613

Merged
merged 1 commit into from
Sep 18, 2024
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
19 changes: 12 additions & 7 deletions .github/workflows/docker-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,13 +36,15 @@ jobs:
uses: actions/checkout@v2


# Install the cosign tool except on PR
# Install the cosign tool (not used on PR, still installed)
# https://github.com/sigstore/cosign-installer
- name: Install cosign
if: github.event_name != 'pull_request'
uses: sigstore/cosign-installer@v1.4.1
uses: sigstore/cosign-installer@main
with:
cosign-release: 'v1.4.1'
cosign-release: 'v2.2.3'

- name: Check cosign version
run: cosign version


# Workaround: https://github.com/docker/build-push-action/issues/461
Expand Down Expand Up @@ -88,8 +90,11 @@ jobs:
# https://github.com/sigstore/cosign
- name: Sign the published Docker image
if: ${{ github.event_name != 'pull_request' }}
env:
COSIGN_EXPERIMENTAL: "true"
# This step uses the identity token to provision an ephemeral certificate
# against the sigstore community Fulcio instance.
run: cosign sign ${{ steps.meta.outputs.tags }}@${{ steps.build-and-push.outputs.digest }}
run: cosign sign --yes ${TAGS}
env:
TAGS: ${{ steps.meta.outputs.tags }}
# should use @${{ steps.build-and-push.outputs.digest }}
# but that leads to "entity not found in registry"
COSIGN_EXPERIMENTAL: "true"
Loading