Skip to content

Commit fe71b7e

Browse files
committed
ci: enable image signing
1 parent 2f815c1 commit fe71b7e

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

.github/workflows/images.yml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,12 @@ jobs:
3838
- name: Checkout code
3939
uses: actions/checkout@v4
4040

41+
- name: Install cosign
42+
if: github.event_name != 'pull_request'
43+
uses: sigstore/cosign-installer@v3
44+
with:
45+
cosign-release: 'v2.5.3'
46+
4147
- name: Set up Docker Buildx
4248
uses: docker/setup-buildx-action@v3
4349

@@ -81,3 +87,9 @@ jobs:
8187
push: ${{ github.event_name == 'push' }}
8288
platforms: ${{ github.event_name == 'push' && 'linux/amd64,linux/arm64' || 'linux/amd64' }}
8389
tags: ghcr.io/${{ github.repository }}/plugins/${{ matrix.image }}:${{ env.TAG_NAME }}
90+
91+
- name: Sign image
92+
if: ${{ github.event_name != 'pull_request' }}
93+
env:
94+
DIGEST: ${{ steps.build-and-push.outputs.digest }}
95+
run: cosign sign --yes ghcr.io/${{ github.repository }}/plugins/${{ matrix.image }}:${{ env.TAG_NAME }}@${DIGEST}

0 commit comments

Comments
 (0)