Skip to content

Commit

Permalink
Fix cosign
Browse files Browse the repository at this point in the history
  • Loading branch information
mostafa committed Aug 14, 2022
1 parent 9949398 commit ec861bc
Showing 1 changed file with 2 additions and 8 deletions.
10 changes: 2 additions & 8 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -71,20 +71,14 @@ jobs:

- name: Sign the Docker image ✍️
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags')
run: |
for tag in ${{ steps.meta.outputs.tags }}; do
cosign sign --key env://COSIGN_PRIVATE_KEY docker.io/${{ tag }}
done
run: echo "${{ steps.meta.outputs.tags }}" | xargs -I {} cosign sign --key env://COSIGN_PRIVATE_KEY docker.io/{}
env:
COSIGN_PASSWORD: ${{ secrets.COSIGN_PASSWORD }}
COSIGN_PRIVATE_KEY: ${{ secrets.COSIGN_PRIVATE_KEY }}

- name: Verify the Docker image signature ✅
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags')
run: |
for tag in ${{ steps.meta.outputs.tags }}; do
cosign verify --key env://COSIGN_PUBLIC_KEY docker.io/${{ tag }}
done
run: echo "${{ steps.meta.outputs.tags }}" | xargs -I {} cosign verify --key env://COSIGN_PUBLIC_KEY docker.io/{}
env:
COSIGN_PUBLIC_KEY: ${{ secrets.COSIGN_PUBLIC_KEY }}

Expand Down

0 comments on commit ec861bc

Please sign in to comment.