From b7c6824b620b791cfee53592388a824bb2f9cab8 Mon Sep 17 00:00:00 2001 From: Junwang Zhao Date: Mon, 25 May 2026 10:18:25 +0800 Subject: [PATCH 1/2] chore: skip actions for draft PRs --- .github/workflows/asf-allowlist-check.yml | 1 + .github/workflows/codeql.yml | 1 + .github/workflows/cpp-linter.yml | 1 + .github/workflows/license_check.yml | 1 + .github/workflows/pre-commit.yml | 1 + .github/workflows/s3_test.yml | 1 + .github/workflows/sanitizer_test.yml | 1 + .github/workflows/test.yml | 4 ++++ .github/workflows/zizmor.yml | 1 + 9 files changed, 12 insertions(+) diff --git a/.github/workflows/asf-allowlist-check.yml b/.github/workflows/asf-allowlist-check.yml index 8d7952a9d..6bb565823 100644 --- a/.github/workflows/asf-allowlist-check.yml +++ b/.github/workflows/asf-allowlist-check.yml @@ -38,6 +38,7 @@ permissions: jobs: asf-allowlist-check: + if: ${{ github.event_name != 'pull_request' || github.event.pull_request.draft == false }} runs-on: ubuntu-24.04 steps: - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml index 6f25d0c9b..f46f079a1 100644 --- a/.github/workflows/codeql.yml +++ b/.github/workflows/codeql.yml @@ -32,6 +32,7 @@ permissions: jobs: analyze: + if: ${{ github.event_name != 'pull_request' || github.event.pull_request.draft == false }} name: Analyze Actions runs-on: ubuntu-slim permissions: diff --git a/.github/workflows/cpp-linter.yml b/.github/workflows/cpp-linter.yml index dd78a98f9..6b05f7875 100644 --- a/.github/workflows/cpp-linter.yml +++ b/.github/workflows/cpp-linter.yml @@ -28,6 +28,7 @@ on: jobs: cpp-linter: + if: ${{ github.event_name != 'pull_request' || github.event.pull_request.draft == false }} runs-on: ubuntu-24.04 permissions: contents: read diff --git a/.github/workflows/license_check.yml b/.github/workflows/license_check.yml index 4bb28c0d5..a1845db91 100644 --- a/.github/workflows/license_check.yml +++ b/.github/workflows/license_check.yml @@ -24,6 +24,7 @@ permissions: jobs: license-check: + if: ${{ github.event_name != 'pull_request' || github.event.pull_request.draft == false }} name: "License Check" runs-on: ubuntu-slim steps: diff --git a/.github/workflows/pre-commit.yml b/.github/workflows/pre-commit.yml index 583f280bd..9f641d73f 100644 --- a/.github/workflows/pre-commit.yml +++ b/.github/workflows/pre-commit.yml @@ -29,6 +29,7 @@ permissions: jobs: pre-commit: + if: ${{ github.event_name != 'pull_request' || github.event.pull_request.draft == false }} runs-on: ubuntu-slim steps: - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 diff --git a/.github/workflows/s3_test.yml b/.github/workflows/s3_test.yml index d9675a4d8..a97234a5f 100644 --- a/.github/workflows/s3_test.yml +++ b/.github/workflows/s3_test.yml @@ -39,6 +39,7 @@ env: jobs: s3-minio: + if: ${{ github.event_name != 'pull_request' || github.event.pull_request.draft == false }} name: S3 (${{ matrix.title }}) runs-on: ${{ matrix.runs-on }} timeout-minutes: 35 diff --git a/.github/workflows/sanitizer_test.yml b/.github/workflows/sanitizer_test.yml index f33eda1be..152ee6a97 100644 --- a/.github/workflows/sanitizer_test.yml +++ b/.github/workflows/sanitizer_test.yml @@ -35,6 +35,7 @@ permissions: jobs: sanitizer-test: + if: ${{ github.event_name != 'pull_request' || github.event.pull_request.draft == false }} name: "ASAN and UBSAN Tests" runs-on: ubuntu-24.04 steps: diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 973d2f437..2231d76e4 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -38,6 +38,7 @@ env: jobs: ubuntu: + if: ${{ github.event_name != 'pull_request' || github.event.pull_request.draft == false }} name: AMD64 Ubuntu 24.04 runs-on: ubuntu-24.04 timeout-minutes: 30 @@ -64,6 +65,7 @@ jobs: CXX: g++-14 run: ci/scripts/build_example.sh $(pwd)/example macos: + if: ${{ github.event_name != 'pull_request' || github.event.pull_request.draft == false }} name: AArch64 macOS 26 runs-on: macos-26 timeout-minutes: 30 @@ -81,6 +83,7 @@ jobs: shell: bash run: ci/scripts/build_example.sh $(pwd)/example windows: + if: ${{ github.event_name != 'pull_request' || github.event.pull_request.draft == false }} name: AMD64 Windows 2025 runs-on: windows-2025 timeout-minutes: 60 @@ -116,6 +119,7 @@ jobs: $ErrorActionPreference = "Stop" bash -lc 'ci/scripts/build_example.sh $(pwd)/example' meson: + if: ${{ github.event_name != 'pull_request' || github.event.pull_request.draft == false }} name: Meson - ${{ matrix.title }} runs-on: ${{ matrix.runs-on }} timeout-minutes: 30 diff --git a/.github/workflows/zizmor.yml b/.github/workflows/zizmor.yml index a265483fa..e06c6a1a4 100644 --- a/.github/workflows/zizmor.yml +++ b/.github/workflows/zizmor.yml @@ -29,6 +29,7 @@ permissions: {} jobs: zizmor: + if: ${{ github.event_name != 'pull_request' || github.event.pull_request.draft == false }} name: Run zizmor 🌈 runs-on: ubuntu-24.04 permissions: {} From 87e05a2324d67a5a543651b78fbf6d08ddbeb28f Mon Sep 17 00:00:00 2001 From: Junwang Zhao Date: Mon, 25 May 2026 10:35:01 +0800 Subject: [PATCH 2/2] trigger the actions when PR switch to Read for review --- .github/workflows/asf-allowlist-check.yml | 1 + .github/workflows/codeql.yml | 1 + .github/workflows/cpp-linter.yml | 1 + .github/workflows/license_check.yml | 4 +++- .github/workflows/pre-commit.yml | 1 + .github/workflows/s3_test.yml | 1 + .github/workflows/sanitizer_test.yml | 1 + .github/workflows/test.yml | 1 + .github/workflows/zizmor.yml | 1 + 9 files changed, 11 insertions(+), 1 deletion(-) diff --git a/.github/workflows/asf-allowlist-check.yml b/.github/workflows/asf-allowlist-check.yml index 6bb565823..5c91ccf9d 100644 --- a/.github/workflows/asf-allowlist-check.yml +++ b/.github/workflows/asf-allowlist-check.yml @@ -25,6 +25,7 @@ name: "ASF Allowlist Check" on: pull_request: + types: [opened, synchronize, reopened, ready_for_review] paths: - ".github/**" push: diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml index f46f079a1..576e74dfe 100644 --- a/.github/workflows/codeql.yml +++ b/.github/workflows/codeql.yml @@ -23,6 +23,7 @@ on: push: branches: [ "main" ] pull_request: + types: [opened, synchronize, reopened, ready_for_review] branches: [ "main" ] schedule: - cron: '16 4 * * 1' diff --git a/.github/workflows/cpp-linter.yml b/.github/workflows/cpp-linter.yml index 6b05f7875..aa5262a52 100644 --- a/.github/workflows/cpp-linter.yml +++ b/.github/workflows/cpp-linter.yml @@ -19,6 +19,7 @@ name: C++ Linter on: pull_request: + types: [opened, synchronize, reopened, ready_for_review] paths-ignore: - '.github/**' - 'ci/**' diff --git a/.github/workflows/license_check.yml b/.github/workflows/license_check.yml index a1845db91..47f974e82 100644 --- a/.github/workflows/license_check.yml +++ b/.github/workflows/license_check.yml @@ -17,7 +17,9 @@ name: "Run License Check" -on: pull_request +on: + pull_request: + types: [opened, synchronize, reopened, ready_for_review] permissions: contents: read diff --git a/.github/workflows/pre-commit.yml b/.github/workflows/pre-commit.yml index 9f641d73f..4bbc2355f 100644 --- a/.github/workflows/pre-commit.yml +++ b/.github/workflows/pre-commit.yml @@ -19,6 +19,7 @@ name: pre-commit on: pull_request: + types: [opened, synchronize, reopened, ready_for_review] push: branches: - '**' diff --git a/.github/workflows/s3_test.yml b/.github/workflows/s3_test.yml index a97234a5f..0cf8e8b1e 100644 --- a/.github/workflows/s3_test.yml +++ b/.github/workflows/s3_test.yml @@ -26,6 +26,7 @@ on: tags: - '**' pull_request: + types: [opened, synchronize, reopened, ready_for_review] concurrency: group: ${{ github.repository }}-${{ github.head_ref || github.sha }}-${{ github.workflow }} diff --git a/.github/workflows/sanitizer_test.yml b/.github/workflows/sanitizer_test.yml index 152ee6a97..efe9f49ac 100644 --- a/.github/workflows/sanitizer_test.yml +++ b/.github/workflows/sanitizer_test.yml @@ -25,6 +25,7 @@ on: tags: - '**' pull_request: + types: [opened, synchronize, reopened, ready_for_review] concurrency: group: ${{ github.repository }}-${{ github.head_ref || github.sha }}-${{ github.workflow }} diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 2231d76e4..9c061db75 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -25,6 +25,7 @@ on: tags: - '**' pull_request: + types: [opened, synchronize, reopened, ready_for_review] concurrency: group: ${{ github.repository }}-${{ github.head_ref || github.sha }}-${{ github.workflow }} diff --git a/.github/workflows/zizmor.yml b/.github/workflows/zizmor.yml index e06c6a1a4..7df1149ff 100644 --- a/.github/workflows/zizmor.yml +++ b/.github/workflows/zizmor.yml @@ -23,6 +23,7 @@ on: push: branches: ["main"] pull_request: + types: [opened, synchronize, reopened, ready_for_review] branches: ["**"] permissions: {}