[CI] fix skipping pr-gate on main (#13525)
This commit is contained in:
@@ -12,15 +12,11 @@ on:
|
|||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
pr-gate:
|
pr-gate:
|
||||||
|
# 1. for commits on main: no gating needed
|
||||||
|
# 2. for workflow_dispatch: this can only be triggered by users with write access
|
||||||
|
if: github.event_name == 'pull_request'
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
# 1. for commits on main: no gating needed
|
|
||||||
# 2. for workflow_dispatch: this can only be triggered by users with write access
|
|
||||||
- name: Skip PR-Gate for non-PR events
|
|
||||||
if: github.event_name != 'pull_request'
|
|
||||||
run: |
|
|
||||||
echo "Not a pull_request event; skipping PR-Gate checks."
|
|
||||||
exit 0
|
|
||||||
- name: Fetch latest PR info
|
- name: Fetch latest PR info
|
||||||
id: pr
|
id: pr
|
||||||
uses: actions/github-script@v7
|
uses: actions/github-script@v7
|
||||||
|
|||||||
Reference in New Issue
Block a user