Skip to content

Commit 08012d8

Browse files
committed
Ensure the pull_request_target event only runs for external forks, not internal PRs
1 parent 5104282 commit 08012d8

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

.github/workflows/preview-build.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,8 +51,8 @@ jobs:
5151
runs-on: ubuntu-latest
5252
# Run on internal PRs or external PRs with 'approve public build' label
5353
if: |
54-
(github.event_name == 'pull_request_target' && !github.event.pull_request.head.repo.fork) ||
55-
(github.event_name == 'pull_request_target' && contains(github.event.pull_request.labels.*.name, 'approve public build'))
54+
(github.event_name == 'pull_request' && !github.event.pull_request.head.repo.fork) ||
55+
(github.event_name == 'pull_request_target' && github.event.pull_request.head.repo.fork && contains(github.event.pull_request.labels.*.name, 'approve public build'))
5656
permissions:
5757
contents: read
5858
id-token: write

0 commit comments

Comments
 (0)