Skip to content

Commit

Permalink
ci: cosign images (#26)
Browse files Browse the repository at this point in the history
  • Loading branch information
chgl authored Aug 19, 2021
1 parent e51a656 commit 0d74e60
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,24 @@ jobs:
platforms: ${{ steps.platforms.outputs.platforms }}
- name: Print Image digest
run: echo ${{ steps.docker_build.outputs.digest }}
- name: Install Cosign
if: ${{ github.event_name != 'pull_request' }}
uses: sigstore/cosign-installer@main
- name: Store signing key in tmp file
if: ${{ github.event_name != 'pull_request' }}
env:
COSIGN_KEY: ${{ secrets.MIRACUM_COSIGN_PRIVATE_KEY }}
run: echo "$COSIGN_KEY" > /tmp/cosign.key
- name: Sign images
if: ${{ github.event_name != 'pull_request' }}
env:
COSIGN_PASSWORD: ${{ secrets.MIRACUM_COSIGN_PASSWORD }}
IMAGES: ${{ steps.docker_meta.outputs.tags }}
run: |
while read -r image; do
echo "Signing $image"
cosign sign -key /tmp/cosign.key "$image"
done <<< "$IMAGES"
release:
needs: build
name: Release
Expand Down

0 comments on commit 0d74e60

Please sign in to comment.