Skip to content

Commit 7ce55f1

Browse files
authored
Merge pull request #40 from z8dn/workflow-optimization-skip-docs
Optimize workflows to skip on documentation-only changes
2 parents 81816df + aae0db2 commit 7ce55f1

File tree

2 files changed

+29
-1
lines changed

2 files changed

+29
-1
lines changed

.github/workflows/build.yml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,22 @@ on:
1616
# Trigger the workflow on pushes to only the 'main' branch (this avoids duplicate checks being run e.g., for dependabot pull requests)
1717
push:
1818
branches: [ main ]
19+
paths-ignore:
20+
# Skip workflow for documentation-only changes
21+
# Note: README.md is NOT ignored because it's used in build.gradle.kts to extract plugin description
22+
- 'CHANGELOG.md'
23+
- 'CONTRIBUTING.md'
24+
- 'CODE_OF_CONDUCT.md'
25+
- 'img/**'
1926
# Trigger the workflow on any pull request
2027
pull_request:
28+
paths-ignore:
29+
# Skip workflow for documentation-only changes
30+
# Note: README.md is NOT ignored because it's used in build.gradle.kts to extract plugin description
31+
- 'CHANGELOG.md'
32+
- 'CONTRIBUTING.md'
33+
- 'CODE_OF_CONDUCT.md'
34+
- 'img/**'
2135

2236
concurrency:
2337
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}

.github/workflows/qodana_code_quality.yml

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,24 @@ name: Qodana
22
on:
33
workflow_dispatch:
44
pull_request:
5+
paths-ignore:
6+
# Skip workflow for documentation-only changes
7+
- 'CHANGELOG.md'
8+
- 'CONTRIBUTING.md'
9+
- 'CODE_OF_CONDUCT.md'
10+
- 'README.md'
11+
- 'img/**'
512
push:
613
branches: # Specify your branches here
714
- main # The 'main' branch
815
- 'releases/*' # The release branches
16+
paths-ignore:
17+
# Skip workflow for documentation-only changes
18+
- 'CHANGELOG.md'
19+
- 'CONTRIBUTING.md'
20+
- 'CODE_OF_CONDUCT.md'
21+
- 'README.md'
22+
- 'img/**'
923

1024
jobs:
1125
qodana:
@@ -15,7 +29,7 @@ jobs:
1529
pull-requests: write
1630
checks: write
1731
steps:
18-
- uses: actions/checkout@v3
32+
- uses: actions/checkout@v6
1933
with:
2034
ref: ${{ github.event.pull_request.head.sha }} # to check out the actual pull request commit, not the merge commit
2135
fetch-depth: 0 # a full history is required for pull request analysis

0 commit comments

Comments
 (0)