Skip to content

Commit

Permalink
fix: pin cosign action for push to main
Browse files Browse the repository at this point in the history
Signed-off-by: K.B.Dharun Krishna <[email protected]>
  • Loading branch information
kbdharun committed May 12, 2024
1 parent 9de2b3e commit a3f72ae
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -86,9 +86,9 @@ jobs:

- uses: sigstore/[email protected]
- name: Sign container image
if: github.repository == 'kbdharun/dev-image' && github.event_name != 'pull_request'
if: github.repository == 'kbdharun/dev-image' && github.ref == 'refs/heads/main'
run: |
cosign sign -y --key env://COSIGN_PRIVATE_KEY ${{ steps.docker_meta.outputs.tags }}
cosign sign -y --key env://COSIGN_PRIVATE_KEY ghcr.io/kbdharun/dev-image:main
env:
COSIGN_EXPERIMENTAL: false
COSIGN_PRIVATE_KEY: ${{ secrets.COSIGN_PRIVATE_KEY }}
Expand Down

0 comments on commit a3f72ae

Please sign in to comment.