File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11name : Authorize PR
22description : >
3- Security gate for pull_request_target workflows. Checks actor write
4- permission, author association, and label presence for external fork PRs.
5- Strips the gate label on synchronize events from non-writers to force
6- re-review after new commits.
3+ Security gate for pull_request_target workflows only . Checks actor
4+ write permission, author association, and label presence for external
5+ fork PRs. Strips the gate label on synchronize events from non-writers
6+ to force re-review after new commits.
77
88inputs :
99 label :
5050 LABELS_JSON : ${{ toJSON(github.event.pull_request.labels.*.name) }}
5151 run : |
5252 # Non-PR events (push, workflow_dispatch, workflow_call) are always trusted
53- if [ "$EVENT" != "pull_request_target" ] && [ "$EVENT" != "pull_request" ] ; then
53+ if [ "$EVENT" != "pull_request_target" ]; then
5454 echo "::notice::Non-PR event ($EVENT) — authorized"
5555 echo "allowed=true" >> "$GITHUB_OUTPUT"
5656 exit 0
Original file line number Diff line number Diff line change @@ -14,6 +14,7 @@ concurrency:
1414
1515jobs :
1616 authorize :
17+ if : github.event.action != 'labeled' || github.event.label.name == 'verify'
1718 runs-on : ubuntu-latest
1819 permissions :
1920 contents : read
Original file line number Diff line number Diff line change @@ -2,7 +2,7 @@ name: Push CI
22
33on :
44 push :
5- branches : main
5+ branches : [ main]
66
77permissions :
88 contents : read
You can’t perform that action at this time.
0 commit comments