Skip to content

Commit 5aba9c5

Browse files
committed
[CI] Prevented Running the CI If Only the Documentation Is Updated
Added a `path-ignore` filter to the GitHub Actions triggers (including `push` and `pull_request`) to filter out any push or pull request that only includes docs updates. The "Test" and "Containers" workflows will be skipped if a push or a PR only contains changes to the documentation, such as the developer guide and README, so that we can save CI resources for other uses.
1 parent 41072d4 commit 5aba9c5

File tree

2 files changed

+20
-0
lines changed

2 files changed

+20
-0
lines changed

.github/workflows/containers.yml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,17 @@ on:
77
push:
88
branches:
99
- master
10+
paths-ignore: # Prevents from running if only docs are updated
11+
- 'doc/**'
12+
- '**/*README*'
13+
- '**.md'
14+
- '**.rst'
1015
pull_request:
16+
paths-ignore: # Prevents from running if only docs are updated
17+
- 'doc/**'
18+
- '**/*README*'
19+
- '**.md'
20+
- '**.rst'
1121
workflow_dispatch:
1222
schedule:
1323
- cron: '0 0 * * 0' # weekly

.github/workflows/test.yml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,17 @@ on:
77
push:
88
branches:
99
- master
10+
paths-ignore: # Prevents from running if only docs are updated
11+
- 'doc/**'
12+
- '**/*README*'
13+
- '**.md'
14+
- '**.rst'
1015
pull_request:
16+
paths-ignore: # Prevents from running if only docs are updated
17+
- 'doc/**'
18+
- '**/*README*'
19+
- '**.md'
20+
- '**.rst'
1121
workflow_dispatch:
1222
schedule:
1323
- cron: '0 0 * * *' # daily

0 commit comments

Comments
 (0)