Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: flagd image signing #338

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 17 additions & 0 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,6 +78,22 @@ jobs:
COMMIT=${{ github.sha }}
DATE=${{ steps.date.outputs.date }}

- name: Install Cosign
uses: sigstore/cosign-installer@main

- 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 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 }}
toddbaert marked this conversation as resolved.
Show resolved Hide resolved

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