Skip to content

Commit

Permalink
Attempt to fix docker sign error.
Browse files Browse the repository at this point in the history
Signed-off-by: Leonardo Rodrigues de Mello <[email protected]>
  • Loading branch information
lmello authored Feb 26, 2024
1 parent b8e0b77 commit d80710f
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion .github/workflows/docker-buid-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -102,11 +102,21 @@ jobs:
# transparency data even for private images, pass --force to cosign below.
# https://github.com/sigstore/cosign
- name: Sign the published Docker image
if: ${{ github.event_name != 'pull_request' }}
if: github.event_name != 'pull_request' && (github.event_name != 'schedule' && startsWith(github.ref, 'refs/tags/v') != true)
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}
- name: Sign the published Docker image no cache
if: github.event_name != 'pull_request' && (github.event_name == 'schedule' || startsWith(github.ref, 'refs/tags/v') == true)
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: ${{ build-and-push-nocache.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}

0 comments on commit d80710f

Please sign in to comment.