Skip to content

Commit

Permalink
Merge pull request #3269 from deckhouse/add-cosign
Browse files Browse the repository at this point in the history
Sign container images
  • Loading branch information
sagikazarmark committed Jan 25, 2024
2 parents 2fa0676 + d0189b0 commit dff6f51
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions .github/workflows/artifacts.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,11 @@ jobs:
- name: Set up Syft
uses: anchore/sbom-action/download-syft@24b0d5238516480139aa8bc6f92eeb7b54a9eb0a # v0.15.5

- name: Install cosign
uses: sigstore/cosign-installer@1fc5bd396d372bee37d608f955b336615edf79c8 # v3.2.0
with:
cosign-release: 'v2.2.1'

- name: Set image name
id: image-name
run: echo "value=ghcr.io/${{ github.repository }}" >> "$GITHUB_OUTPUT"
Expand Down Expand Up @@ -130,6 +135,11 @@ jobs:
outputs: ${{ steps.build-output.outputs.value }}
# push: ${{ inputs.publish }}

- name: Sign the images with GitHub OIDC Token
run: |
cosign sign --yes ${{ steps.image-name.outputs.value }}@${{ steps.build.outputs.digest }}
if: inputs.publish

- name: Set image ref
id: image-ref
run: echo "value=${{ steps.image-name.outputs.value }}@${{ steps.build.outputs.digest }}" >> "$GITHUB_OUTPUT"
Expand Down

0 comments on commit dff6f51

Please sign in to comment.