Skip to content

Commit

Permalink
fix: added image signing
Browse files Browse the repository at this point in the history
  • Loading branch information
caroldelwing committed Jan 8, 2024
1 parent 5ac406a commit edaeeaa
Showing 1 changed file with 18 additions and 1 deletion.
19 changes: 18 additions & 1 deletion .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ jobs:
- name: Build and push
if: ${{ steps.dependencies.outputs.VERSION != ''}}
uses: docker/build-push-action@v2
id: build-and-push
with:
context: .
build-args: |
Expand All @@ -74,7 +75,23 @@ jobs:
platforms: linux/amd64,linux/arm64
push: true
tags: ghcr.io/${{ github.repository }}:${{steps.dependencies.outputs.VERSION}}


- uses: sigstore/[email protected]

- name: Image Signing
run: |
cosign sign --yes \
-a "repo=${{ github.repository }}" \
-a "workflow=${{ github.workflow }}" \
-a "ref=${{ github.sha }}" \
-a "owner=Spectro Cloud" \
--key env://COSIGN_PRIVATE_KEY --recursive "${TAGS}@${DIGEST}"
env:
TAGS: ghcr.io/${{ github.repository }}:${{steps.dependencies.outputs.VERSION}}
COSIGN_PRIVATE_KEY: ${{ secrets.COSIGN_PRIVATE_KEY }}
COSIGN_PASSWORD: ${{ secrets.COSIGN_PASSWORD }}
DIGEST: ${{ steps.build-and-push.outputs.digest }}


release:
name: "Release"
Expand Down

0 comments on commit edaeeaa

Please sign in to comment.