Skip to content

Commit

Permalink
Use ${{github.repository}} placeholder in OIDC GitHub workflow (#1244)
Browse files Browse the repository at this point in the history
With sigstore/cosign hard-coded, when someone forks the repo they start
running the workflow every day, which fails because their repo
(hopefully) can't push to ghcr.io/sigstore/cosign.

Using a variable instead means they'll push to their own GHCR namespace.

Signed-off-by: Jason Hall <jasonhall@redhat.com>
  • Loading branch information
imjasonh committed Dec 22, 2021
1 parent 47d936c commit b3bd158
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion .github/workflows/github-oidc.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ jobs:
GIT_VERSION: latest
GITHUB_RUN_ID: ${{ github.run_id }}
GITHUB_RUN_ATTEMPT: ${{ github.run_attempt }}
KO_PREFIX: ghcr.io/sigstore/cosign
KO_PREFIX: ghcr.io/${{ github.repository }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
Expand Down

0 comments on commit b3bd158

Please sign in to comment.