Skip to content

Commit

Permalink
Add cosign of image (experimental)
Browse files Browse the repository at this point in the history
  • Loading branch information
leojonathanoh committed Mar 3, 2023
1 parent b94c9e0 commit 3408e60
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions .github/workflows/docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,9 @@ jobs:
- run: |
ls -al release*/
- name: Install cosign
uses: sigstore/cosign-installer@c3667d99424e7e6047999fb6246c0da843953c65 # v3.0.1

- name: Build and push
id: build-and-push
# TODO: Remove pull_request before merging
Expand All @@ -133,6 +136,10 @@ jobs:
cache-from: type=local,src=/tmp/.buildx-cache
cache-to: type=local,dest=/tmp/.buildx-cache-new,mode=max

- name: Sign the published Docker image
# if: ${{ github.event_name != 'pull_request' }}
run: echo "${{ steps.meta.outputs.tags }}" | xargs -I {} cosign sign --yes {}@${{ steps.build-and-push.outputs.digest }}

# Temp fix
# https://github.com/docker/build-push-action/issues/252
# https://github.com/moby/buildkit/issues/1896
Expand Down

0 comments on commit 3408e60

Please sign in to comment.