Skip to content

Commit 6689f57

Browse files
feat: Skip CI when only docs changed
Signed-off-by: Evgeniy Dikevich <[email protected]>
1 parent 1522504 commit 6689f57

File tree

1 file changed

+29
-4
lines changed

1 file changed

+29
-4
lines changed

.github/workflows/ci.yml

Lines changed: 29 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,13 +16,38 @@ permissions:
1616
pull-requests: write
1717

1818
jobs:
19+
paths-filter:
20+
runs-on: ubuntu-latest
21+
outputs:
22+
docs: ${{ steps.filter.outputs.docs }}
23+
not-only-docs: ${{ steps.filter.outputs.not-only-docs }}
24+
steps:
25+
- uses: actions/checkout@v5
26+
- uses: dorny/paths-filter@v3
27+
id: filter
28+
with:
29+
filters: |
30+
docs:
31+
- 'docs/**'
32+
- '.config/dictionaries/project.dic'
33+
not-only-docs:
34+
- '!((docs/**)|.config/dictionaries/project.dic)'
35+
36+
docs-only:
37+
if: ${{ needs.paths-filter.outputs.docs == 'true' && needs.paths-filter.outputs.not-only-docs != 'true' }}
38+
needs: [paths-filter]
39+
uses: input-output-hk/catalyst-forge/.github/workflows/release.yml@ci/v1.10.0
40+
with:
41+
releases: '[{"project":"./docs","name":"docs"}]'
42+
forge_version: 0.21.0
43+
1944
ci:
20-
if: ${{ !github.event.pull_request.draft }}
21-
uses: input-output-hk/catalyst-forge/.github/workflows/ci.yml@ci/v1.9.0
45+
if: ${{ !github.event.pull_request.draft && needs.paths-filter.outputs.not-only-docs == 'true'}}
46+
uses: input-output-hk/catalyst-forge/.github/workflows/ci.yml@ci/v1.10.0
2247
with:
23-
forge_version: 0.20.0
48+
forge_version: 0.21.0
2449

2550
test_reporting:
2651
if: ${{ !github.event.pull_request.draft }}
27-
needs: ci
52+
needs: [ci]
2853
uses: ./.github/workflows/generate-allure-report.yml

0 commit comments

Comments
 (0)