Skip to content

Commit 43081c5

Browse files
committed
chore: attempt to restrict push when allowed
1 parent d390dce commit 43081c5

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

.github/workflows/docker-publish.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -84,8 +84,8 @@ jobs:
8484
platforms: ${{ matrix.platform }}
8585
labels: ${{ steps.meta.outputs.labels }}
8686
annotations: ${{ steps.meta.outputs.annotations }}
87-
outputs: type=image,name=ghcr.io/${{ env.REPO }},push-by-digest=true,name-canonical=true,push=false,oci-mediatypes=true
88-
push: false
87+
outputs: type=image,name=ghcr.io/${{ env.REPO }},push-by-digest=true,name-canonical=true,oci-mediatypes=true
88+
push: ${{ github.event.pull_request.head.repo.full_name == github.repository }}
8989
cache-from: type=gha,scope=${{ matrix.platform }}
9090
cache-to: type=gha,mode=max,scope=${{ matrix.platform }}
9191

@@ -104,6 +104,7 @@ jobs:
104104
retention-days: 1
105105

106106
merge:
107+
if: github.event.pull_request.head.repo.full_name == github.repository
107108
name: Merge Docker manifests
108109
runs-on: ubuntu-latest
109110

0 commit comments

Comments
 (0)