diff --git a/.github/workflows/image.yml b/.github/workflows/image.yml index 29f47a5..0315d6d 100644 --- a/.github/workflows/image.yml +++ b/.github/workflows/image.yml @@ -83,6 +83,7 @@ jobs: - uses: sigstore/cosign-installer@v3.5.0 - name: Sign container image + if: github.repository == 'kbdharun/dev-image' && github.event_name != 'pull_request' run: | cosign sign -y --key env://COSIGN_PRIVATE_KEY ${{ steps.docker_meta.outputs.tags }} env: @@ -92,7 +93,8 @@ jobs: - name: Attest pushed image uses: actions/attest-build-provenance@v1 id: attest + if: github.repository == 'kbdharun/dev-image' && github.event_name != 'pull_request' with: subject-name: ghcr.io/${{ github.actor }}/${{ env.IMAGE_NAME }} subject-digest: ${{ steps.push-ghcr.outputs.digest }} - push-to-registry: true + push-to-registry: false