This repository has been archived by the owner on Dec 25, 2024. It is now read-only.
generated from blue-build/template
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: signing with digest instead of tag
- Loading branch information
1 parent
abd6f5b
commit 644aa29
Showing
1 changed file
with
10 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -90,6 +90,7 @@ jobs: | |
/usr/local/bin/bluebuild template -v ./config/recipes/recipe${{matrix.recipe}} -o /tmp/Containerfile | ||
- name: Build | ||
id: build_image | ||
uses: docker/build-push-action@v5 | ||
with: | ||
context: . | ||
|
@@ -116,12 +117,13 @@ jobs: | |
- name: Push To GHCR Image Registry | ||
run: docker push --disable-content-trust ${{ env.IMAGE_REGISTRY }}/${{ steps.recipes_meta.outputs.IMAGE_NAME }} | ||
|
||
- name: Install cosign | ||
uses: sigstore/[email protected] | ||
|
||
- name: Sign container image | ||
uses: EyeCantCU/cosign-action/[email protected] | ||
if: github.event_name != 'pull_request' | ||
with: | ||
containers: ${{ steps.recipes_meta.outputs.IMAGE_NAME }} | ||
registry: ${{ env.IMAGE_REGISTRY }} | ||
registry-token: ${{ github.token }} | ||
signing-secret: ${{ secrets.SIGNING_SECRET }} | ||
tags: latest | ||
shell: bash | ||
run: | | ||
cosign sign -y --key env://COSIGN_PRIVATE_KEY ${{ env.IMAGE_REGISTRY }}/${{ steps.recipes_meta.outputs.IMAGE_NAME }}@sha256:${{ steps.build_image.outputs.digest }} | ||
env: | ||
COSIGN_EXPERIMENTAL: false | ||
COSIGN_PRIVATE_KEY: ${{ env.SIGNING_SECRET }} |