Skip to content

Commit 73dbde5

Browse files
authored
fix: added image signing (#29) - DOC-965
1 parent 5ac406a commit 73dbde5

File tree

1 file changed

+18
-1
lines changed

1 file changed

+18
-1
lines changed

.github/workflows/release.yaml

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,7 @@ jobs:
6262
- name: Build and push
6363
if: ${{ steps.dependencies.outputs.VERSION != ''}}
6464
uses: docker/build-push-action@v2
65+
id: build-and-push
6566
with:
6667
context: .
6768
build-args: |
@@ -74,7 +75,23 @@ jobs:
7475
platforms: linux/amd64,linux/arm64
7576
push: true
7677
tags: ghcr.io/${{ github.repository }}:${{steps.dependencies.outputs.VERSION}}
77-
78+
79+
- uses: sigstore/cosign-installer@v3.3.0
80+
81+
- name: Image Signing
82+
run: |
83+
cosign sign --yes \
84+
-a "repo=${{ github.repository }}" \
85+
-a "workflow=${{ github.workflow }}" \
86+
-a "ref=${{ github.sha }}" \
87+
-a "owner=Spectro Cloud" \
88+
--key env://COSIGN_PRIVATE_KEY --recursive "${TAGS}@${DIGEST}"
89+
env:
90+
TAGS: ghcr.io/${{ github.repository }}:${{steps.dependencies.outputs.VERSION}}
91+
COSIGN_PRIVATE_KEY: ${{ secrets.COSIGN_PRIVATE_KEY }}
92+
COSIGN_PASSWORD: ${{ secrets.COSIGN_PASSWORD }}
93+
DIGEST: ${{ steps.build-and-push.outputs.digest }}
94+
7895

7996
release:
8097
name: "Release"

0 commit comments

Comments
 (0)