Skip to content

Commit

Permalink
ci(patch): always push an image on secured path
Browse files Browse the repository at this point in the history
Signed-off-by: r3drun3 <[email protected]>
  • Loading branch information
R3DRUN3 committed Apr 18, 2024
1 parent 16f6f96 commit 5afac4c
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions .github/workflows/patch.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,7 @@ jobs:

- name: Move image to new location if copa/trivy failed
if: failure() && steps.copa.conclusion == 'failure'
id: move
run: |
docker pull registry.sighup.io/fury/${{ env.IMAGE_NAME }}:${{ env.PATCHED_TAG }}
docker tag registry.sighup.io/fury/${{ env.IMAGE_NAME }}:${{ env.PATCHED_TAG }} registry.sighup.io/fury/secured/${{ env.IMAGE_NAME }}:${{ env.PATCHED_TAG }}
Expand All @@ -112,14 +113,14 @@ jobs:
- name: Produce Image SBOM
id: sbom
if: steps.push.conclusion == 'success'
if: steps.push.conclusion == 'success' || steps.push.move == 'success'
uses: anchore/sbom-action@v0
with:
image: "registry.sighup.io/fury/secured/${{ env.IMAGE_NAME }}:${{ env.PATCHED_TAG }}"
artifact-name: ${{ env.PATCHED_TAG_SBOM }}.spdx.json

- name: Sign Image with Cosign
if: steps.push.conclusion == 'success'
if: steps.push.conclusion == 'success' || steps.push.move == 'success'
run: |
cosign sign --yes --key env://COSIGN_PRIVATE_KEY "registry.sighup.io/fury/secured/${{ env.IMAGE_NAME }}:${{ env.PATCHED_TAG }}"
env:
Expand Down

0 comments on commit 5afac4c

Please sign in to comment.