Skip to content

Commit 88f3c41

Browse files
manuzhangcodex
andauthored
ci: scope pull request checks to relevant paths (#839)
## What - For pull requests, run ASF allowlist, Actions CodeQL, and zizmor only for YAML changes under `.github`. - For pull requests, skip AWS, sanitizer, SQL catalog, general test, and C++ lint workflows for Markdown, documentation, devcontainer, and release-development-only changes. - Keep license and pre-commit checks unfiltered. ## Why These workflows currently run on pull requests even when every changed path is unrelated to what they validate. Directory and extension globs keep the filters applicable to future files without maintaining filename lists, and keeping filters off push triggers avoids duplicate maintenance. ## Impact Documentation and development-only pull requests avoid unrelated CI work. Mixed changes still run the relevant workflows, GitHub YAML changes still run the Actions validators, and main, tag, and scheduled runs remain unfiltered. --------- Co-authored-by: Codex <codex@openai.com>
1 parent e7c5e9c commit 88f3c41

8 files changed

Lines changed: 33 additions & 4 deletions

File tree

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

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,9 @@ on:
2929
- main
3030
pull_request:
3131
types: [opened, synchronize, reopened, ready_for_review]
32+
paths:
33+
- '.github/**/*.yml'
34+
- '.github/**/*.yaml'
3235

3336
permissions:
3437
contents: read

.github/workflows/aws_test.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,11 @@ on:
2525
- '**'
2626
pull_request:
2727
types: [opened, synchronize, reopened, ready_for_review]
28+
paths-ignore:
29+
- '.devcontainer/**'
30+
- '**/*.md'
31+
- 'dev/**'
32+
- 'mkdocs/**'
2833

2934
concurrency:
3035
group: ${{ github.repository }}-${{ github.head_ref || github.sha }}-${{ github.workflow }}

.github/workflows/codeql.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,9 @@ on:
2727
types: [opened, synchronize, reopened, ready_for_review]
2828
branches:
2929
- main
30+
paths:
31+
- '.github/**/*.yml'
32+
- '.github/**/*.yaml'
3033
schedule:
3134
- cron: '16 4 * * 1'
3235

.github/workflows/cpp-linter.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,18 +21,18 @@ on:
2121
push:
2222
branches:
2323
- main
24-
paths-ignore:
25-
- '.github/**'
26-
- 'ci/**'
27-
- 'cmake_modules/**'
2824
pull_request:
2925
types: [opened, synchronize, reopened, ready_for_review]
3026
branches:
3127
- main
3228
paths-ignore:
29+
- '.devcontainer/**'
3330
- '.github/**'
31+
- '**/*.md'
3432
- 'ci/**'
3533
- 'cmake_modules/**'
34+
- 'dev/**'
35+
- 'mkdocs/**'
3636

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

.github/workflows/sanitizer_test.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,11 @@ on:
2525
- '**'
2626
pull_request:
2727
types: [opened, synchronize, reopened, ready_for_review]
28+
paths-ignore:
29+
- '.devcontainer/**'
30+
- '**/*.md'
31+
- 'dev/**'
32+
- 'mkdocs/**'
2833

2934
concurrency:
3035
group: ${{ github.repository }}-${{ github.head_ref || github.sha }}-${{ github.workflow }}

.github/workflows/sql_catalog_test.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,11 @@ on:
2525
- '**'
2626
pull_request:
2727
types: [opened, synchronize, reopened, ready_for_review]
28+
paths-ignore:
29+
- '.devcontainer/**'
30+
- '**/*.md'
31+
- 'dev/**'
32+
- 'mkdocs/**'
2833

2934
concurrency:
3035
group: ${{ github.repository }}-${{ github.head_ref || github.sha }}-${{ github.workflow }}

.github/workflows/test.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,11 @@ on:
2525
- '**'
2626
pull_request:
2727
types: [opened, synchronize, reopened, ready_for_review]
28+
paths-ignore:
29+
- '.devcontainer/**'
30+
- '**/*.md'
31+
- 'dev/**'
32+
- 'mkdocs/**'
2833

2934
concurrency:
3035
group: ${{ github.repository }}-${{ github.head_ref || github.sha }}-${{ github.workflow }}

.github/workflows/zizmor.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,9 @@ on:
2525
- main
2626
pull_request:
2727
types: [opened, synchronize, reopened, ready_for_review]
28+
paths:
29+
- '.github/**/*.yml'
30+
- '.github/**/*.yaml'
2831

2932
concurrency:
3033
group: ${{ github.repository }}-${{ github.head_ref || github.sha }}-${{ github.workflow }}

0 commit comments

Comments
 (0)