Skip to content

Commit

Permalink
add public key to release artefacts
Browse files Browse the repository at this point in the history
Signed-off-by: Kavindu Dodanduwa <kavindudodanduwa@gmail.com>
  • Loading branch information
Kavindu-Dodan authored and toddbaert committed Feb 1, 2023
1 parent 9251d9e commit 04839eb
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions .github/workflows/release-please.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ env:
REGISTRY: ghcr.io
IMAGE_NAME: ${{ github.repository }}
DEFAULT_GO_VERSION: 1.19.3
PUBLIC_KEY_FILE: publicKey.pub

name: Run Release Please
jobs:
Expand Down Expand Up @@ -79,16 +80,20 @@ jobs:
- name: Install Cosign
uses: sigstore/cosign-installer@main
with:
cosign-release: "v2.8.1"

- name: Sign image with a key
- name: Sign the image
run: |
cosign sign --key env://COSIGN_PRIVATE_KEY ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ needs.release-please.outputs.release_tag_name }}
cosign sign --key env://COSIGN_PRIVATE_KEY ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ needs.release-please.outputs.release_tag_name }}
cosign public-key --key env://COSIGN_PRIVATE_KEY --outfile ${{ env.PUBLIC_KEY_FILE }}
env:
COSIGN_PRIVATE_KEY: ${{secrets.COSIGN_PRIVATE_KEY}}
COSIGN_PASSWORD: ${{secrets.COSIGN_PASSWORD}}

- name: Bundle release assets
uses: softprops/action-gh-release@v1
with:
files: ${{ env.PUBLIC_KEY_FILE }}

- name: SBOM for latest image
uses: anchore/sbom-action@06e109483e6aa305a2b2395eabae554e51530e1d # v0
with:
Expand Down

0 comments on commit 04839eb

Please sign in to comment.