From 6e9b154981c13e34819c8d2d709ef05460e2a0a0 Mon Sep 17 00:00:00 2001 From: Liangsheng Yin Date: Wed, 19 Nov 2025 00:57:22 +0800 Subject: [PATCH] [CI] fix skipping pr-gate on main (#13525) --- .github/workflows/pr-gate.yml | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/.github/workflows/pr-gate.yml b/.github/workflows/pr-gate.yml index 49eda05d1..0e2692862 100644 --- a/.github/workflows/pr-gate.yml +++ b/.github/workflows/pr-gate.yml @@ -12,15 +12,11 @@ on: jobs: 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 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 id: pr uses: actions/github-script@v7