Skip to content

Commit 8fdc382

Browse files
authored
Merge pull request #423 from zeha/zeha/ghcr
Stop running docker build for non-collaborators
2 parents 522539d + 80a4a71 commit 8fdc382

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

.github/workflows/docker.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ jobs:
9797
with:
9898
context: .
9999
file: ./Dockerfile
100-
push: true
100+
push: ${{ github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name == github.repository }}
101101
tags: ${{ steps.meta.outputs.tags }}
102102
labels: |
103103
${{ steps.meta.outputs.labels }}
@@ -115,6 +115,7 @@ jobs:
115115
create-manifest:
116116
runs-on: ubuntu-latest
117117
needs: build-and-push
118+
if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name == github.repository
118119
permissions:
119120
contents: read
120121
packages: write
@@ -161,7 +162,7 @@ jobs:
161162
162163
comment-pr:
163164
runs-on: ubuntu-latest
164-
if: github.event_name == 'pull_request'
165+
if: github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name == github.repository
165166
needs: create-manifest
166167
permissions:
167168
contents: read

0 commit comments

Comments
 (0)