Skip to content

Commit

Permalink
sign Docker image on release #5
Browse files Browse the repository at this point in the history
  • Loading branch information
irongut committed Jul 7, 2022
1 parent d4dc056 commit 2bb7333
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions .github/workflows/release-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,14 @@ jobs:
- name: Checkout
uses: actions/checkout@v3

- name: Install Cosign
uses: sigstore/[email protected]
with:
cosign-release: 'v1.9.0'

- name: Setup Docker Buildx
uses: docker/[email protected]

- name: Login to GitHub Container Registry
uses: docker/login-action@v2
with:
Expand All @@ -52,9 +60,18 @@ jobs:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}

- name: Build + Push Docker image
id: build-and-push
uses: docker/build-push-action@v3
with:
context: .
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}

# Sign the Docker image digest
# Uses the identity token to provision an ephemeral certificate against the community Fulcio instance
# https://github.com/sigstore/cosign
- name: Sign the Docker image
env:
COSIGN_EXPERIMENTAL: "true"
run: cosign sign ${{ steps.meta.outputs.tags }}@${{ steps.build-and-push.outputs.digest }}

0 comments on commit 2bb7333

Please sign in to comment.