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 committed Jan 30, 2023
1 parent ace8ba3 commit 6d07b1e
Showing 1 changed file with 10 additions and 4 deletions.
14 changes: 10 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 @@ -77,15 +78,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 }}

go-release:
needs: release-please
runs-on: ubuntu-latest
Expand Down

0 comments on commit 6d07b1e

Please sign in to comment.