Skip to content

Commit 54ec50c

Browse files
committed
fixing workflows issue
1 parent 2d0eafe commit 54ec50c

3 files changed

Lines changed: 7 additions & 6 deletions

File tree

.github/actions/authorize-pr/action.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
name: Authorize PR
22
description: >
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
88
inputs:
99
label:
@@ -50,7 +50,7 @@ runs:
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

.github/workflows/ci-pr.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ concurrency:
1414

1515
jobs:
1616
authorize:
17+
if: github.event.action != 'labeled' || github.event.label.name == 'verify'
1718
runs-on: ubuntu-latest
1819
permissions:
1920
contents: read

.github/workflows/ci-push.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ name: Push CI
22

33
on:
44
push:
5-
branches: main
5+
branches: [main]
66

77
permissions:
88
contents: read

0 commit comments

Comments
 (0)