0
Fork 0
mirror of https://github.com/willnorris/imageproxy.git synced 2024-12-16 21:56:43 -05:00

ci: try signing docker image with cosign

This commit is contained in:
Will Norris 2021-12-07 11:27:49 -08:00
parent e155a719ee
commit 8fd838a5cc

View file

@ -17,6 +17,7 @@ jobs:
permissions: permissions:
contents: read contents: read
packages: write packages: write
id-token: write
steps: steps:
- uses: actions/checkout@v2 - uses: actions/checkout@v2
@ -46,3 +47,13 @@ jobs:
push: ${{ github.event_name != 'pull_request' }} push: ${{ github.event_name != 'pull_request' }}
tags: ${{ steps.meta.outputs.tags }} tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }} labels: ${{ steps.meta.outputs.labels }}
# Sign the Docker image
- name: Install cosign
if: github.event_name != 'pull_request'
uses: sigstore/cosign-installer@e5c096a9feb091d8afe0168547370270986f2f71 #v1.3.1
- name: Sign the published Docker image
if: github.event_name != 'pull_request'
env:
COSIGN_EXPERIMENTAL: "true"
run: cosign sign ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}@${{ steps.build-and-push.outputs.digest }}