diff --git a/.github/workflows/images_build.yml b/.github/workflows/images_build.yml index ccca09852..9fe28ce24 100644 --- a/.github/workflows/images_build.yml +++ b/.github/workflows/images_build.yml @@ -172,6 +172,11 @@ jobs: with: fetch-depth: 1 + - name: Install cosign + uses: sigstore/cosign-installer@6e04d228eb30da1757ee4e1dd75a0ec73a653e06 #v3.1.1 + with: + cosign-release: 'v2.1.1' + - name: Set up QEMU uses: docker/setup-qemu-action@v3 with: @@ -228,6 +233,17 @@ jobs: cache-from: type=gha cache-to: type=gha,mode=max + - name: Sign the images with GitHub OIDC Token + env: + DIGEST: ${{ steps.docker_build.outputs.digest }} + TAGS: ${{ steps.meta.outputs.tags }} + run: | + images="" + for tag in ${TAGS}; do + images+="${tag}@${DIGEST} " + done + cosign sign --yes ${images} + - name: Image digest run: | echo ${{ steps.docker_build.outputs.digest }}