Skip to content

Commit 131f976

Browse files
abnobdossAbanoub Doss
andauthored
ci: scope push trigger to main to drop redundant PR runs (#802)
## Change Make push triggers more consistent by having the test workflows run branch pushes only on `main`. Pull requests still run the same checks, and tag builds are unchanged. The duplicate-run case is narrow: it only happens for branches pushed directly to the Apache repo, so it mostly affects committers and bots rather than normal fork-based contributors. Pull request checks cover those branch updates; direct `main` runs still give us post-merge CI and warm caches. Also cleans up nearby `on:` sections so the triggers are easier to compare, including removing `zizmor`'s redundant all-branches pull request filter. ## Validation Checked that all workflow YAML files still parse. ## Remaining Trigger Inconsistencies These are intentional or out of scope, so this PR leaves them alone: - Test workflows still run on all tag pushes to preserve release behavior. - `rc` only runs on release-candidate tags. - `pre-commit` still runs on regular branch pushes because it is cheap. - `docs`, `cpp-linter`, `license_check`, and `codeql` keep their narrower rules. Related discussion: #799. Co-authored-by: Abanoub Doss <abanoub.doss@gmail.com>
1 parent cd4ca42 commit 131f976

9 files changed

Lines changed: 16 additions & 18 deletions

File tree

.github/workflows/asf-allowlist-check.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,11 +24,11 @@
2424
name: "ASF Allowlist Check"
2525

2626
on:
27-
pull_request:
28-
types: [opened, synchronize, reopened, ready_for_review]
2927
push:
3028
branches:
3129
- main
30+
pull_request:
31+
types: [opened, synchronize, reopened, ready_for_review]
3232

3333
permissions:
3434
contents: read

.github/workflows/aws_test.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,7 @@ name: AWS Tests
2020
on:
2121
push:
2222
branches:
23-
- '**'
24-
- '!dependabot/**'
23+
- main
2524
tags:
2625
- '**'
2726
pull_request:

.github/workflows/codeql.yml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,10 +21,12 @@ name: "CodeQL"
2121

2222
on:
2323
push:
24-
branches: [ "main" ]
24+
branches:
25+
- main
2526
pull_request:
2627
types: [opened, synchronize, reopened, ready_for_review]
27-
branches: [ "main" ]
28+
branches:
29+
- main
2830
schedule:
2931
- cron: '16 4 * * 1'
3032

.github/workflows/cpp-linter.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,12 +27,12 @@ on:
2727
- 'cmake_modules/**'
2828
pull_request:
2929
types: [opened, synchronize, reopened, ready_for_review]
30+
branches:
31+
- main
3032
paths-ignore:
3133
- '.github/**'
3234
- 'ci/**'
3335
- 'cmake_modules/**'
34-
branches:
35-
- main
3636

3737
concurrency:
3838
group: ${{ github.repository }}-${{ github.head_ref || github.sha }}-${{ github.workflow }}

.github/workflows/pre-commit.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,12 +18,12 @@
1818
name: pre-commit
1919

2020
on:
21-
pull_request:
22-
types: [opened, synchronize, reopened, ready_for_review]
2321
push:
2422
branches:
2523
- '**'
2624
- '!dependabot/**'
25+
pull_request:
26+
types: [opened, synchronize, reopened, ready_for_review]
2727

2828
concurrency:
2929
group: ${{ github.repository }}-${{ github.head_ref || github.sha }}-${{ github.workflow }}

.github/workflows/sanitizer_test.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,7 @@ name: ASAN and UBSAN Tests
2020
on:
2121
push:
2222
branches:
23-
- '**'
24-
- '!dependabot/**'
23+
- main
2524
tags:
2625
- '**'
2726
pull_request:

.github/workflows/sql_catalog_test.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,7 @@ name: SQL Catalog Tests
2020
on:
2121
push:
2222
branches:
23-
- '**'
24-
- '!dependabot/**'
23+
- main
2524
tags:
2625
- '**'
2726
pull_request:

.github/workflows/test.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,7 @@ name: Test
2020
on:
2121
push:
2222
branches:
23-
- '**'
24-
- '!dependabot/**'
23+
- main
2524
tags:
2625
- '**'
2726
pull_request:

.github/workflows/zizmor.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,10 +21,10 @@ name: GitHub Actions Security Analysis with zizmor 🌈
2121

2222
on:
2323
push:
24-
branches: ["main"]
24+
branches:
25+
- main
2526
pull_request:
2627
types: [opened, synchronize, reopened, ready_for_review]
27-
branches: ["**"]
2828

2929
concurrency:
3030
group: ${{ github.repository }}-${{ github.head_ref || github.sha }}-${{ github.workflow }}

0 commit comments

Comments
 (0)