Skip to content

Commit 78cd1c8

Browse files
authored
Disable pushing container images from forks (#207)
* Try disabling pushing container images from forks * Skip attest step from forks * Add changelog
1 parent 70bb464 commit 78cd1c8

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

.github/workflows/containers.yaml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,12 +43,13 @@ jobs:
4343
cache-to: type=gha,mode=max
4444
context: .
4545
file: packages/ref/Dockerfile
46-
push: true
46+
push: ${{ ! github.event.pull_request.head.repo.fork }}
4747
sbom: true
4848
tags: ${{ steps.metadata.outputs.tags }}
4949
labels: ${{ steps.metadata.outputs.labels }}
5050
- name: Attest to REF image
5151
uses: actions/attest-build-provenance@v2
52+
if: ${{ ! github.event.pull_request.head.repo.fork }}
5253
with:
5354
subject-name: ghcr.io/${{ github.repository_owner }}/ref
5455
subject-digest: ${{ steps.push.outputs.digest }}

changelog/207.ci.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Disabled trying to push container images to the registry from forks.

0 commit comments

Comments
 (0)