mirror of
https://github.com/kyverno/kyverno.git
synced 2025-03-31 03:45:17 +00:00
add separate step for digest (#3321)
Signed-off-by: Naman Lakhwani <namanlakhwani@gmail.com>
This commit is contained in:
parent
985e2cc158
commit
fd7addd2fa
1 changed files with 14 additions and 1 deletions
15
.github/workflows/reuse.yaml
vendored
15
.github/workflows/reuse.yaml
vendored
|
@ -132,7 +132,7 @@ jobs:
|
|||
|
||||
- name: get image digest
|
||||
if: ${{inputs.tag == 'image' && steps.extract_branch.outputs.branch == 'main'}}
|
||||
id: get-step
|
||||
id: get-step-image
|
||||
run: |
|
||||
echo "::set-output name=digest::$(make ${{inputs.digest_command}}-dev)"
|
||||
|
||||
|
@ -143,6 +143,19 @@ jobs:
|
|||
echo "::set-output name=digest::$(make ${{inputs.digest_command}})"
|
||||
|
||||
- name: Sign image
|
||||
if: ${{inputs.tag == 'image' && steps.extract_branch.outputs.branch == 'main'}}
|
||||
env:
|
||||
COSIGN_EXPERIMENTAL: "true"
|
||||
COSIGN_REPOSITORY: "ghcr.io/kyverno/signatures"
|
||||
run: |
|
||||
cosign sign \
|
||||
-a "repo=${{ github.repository }}" \
|
||||
-a "workflow=${{ github.workflow }}" \
|
||||
-a "ref=${{ github.sha }}" \
|
||||
ghcr.io/kyverno/${{inputs.image_name}}@sha256:${{ steps.get-step-image.outputs.digest }}
|
||||
|
||||
- name: Sign release-image
|
||||
if: ${{inputs.tag == 'release' || (inputs.tag == 'image' && steps.check-branch.outputs.match == 'true')}}
|
||||
env:
|
||||
COSIGN_EXPERIMENTAL: "true"
|
||||
COSIGN_REPOSITORY: "ghcr.io/kyverno/signatures"
|
||||
|
|
Loading…
Add table
Reference in a new issue