diff --git a/.github/workflows/patch.yaml b/.github/workflows/patch.yaml index fc94895..d82ba12 100644 --- a/.github/workflows/patch.yaml +++ b/.github/workflows/patch.yaml @@ -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 }} @@ -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: