Skip to content

Commit 99bcff0

Browse files
authored
Path filtering improvement (#2059)
* Another attempt at getting path filtering right * Improve filters
1 parent ab10e46 commit 99bcff0

File tree

1 file changed

+6
-12
lines changed

1 file changed

+6
-12
lines changed

.github/workflows/nodejs.yml

Lines changed: 6 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -9,29 +9,23 @@ jobs:
99
name: Detect files changed
1010
runs-on: ubuntu-latest
1111
outputs:
12-
skip: '${{ steps.changes.outputs.skip }}'
12+
src-only: '${{ steps.changes.outputs.src-only }}'
1313
steps:
1414
- uses: actions/checkout@v4
1515
- uses: dorny/paths-filter/@v2.11.1
1616
id: changes
1717
with:
1818
filters: |
19-
skip:
20-
- '**/*.md'
21-
- '**/*.asciidoc'
22-
- '**/*.txt'
23-
- 'docs/**'
24-
- '.ci/**'
25-
- '.buildkite/**'
26-
- 'scripts/**'
27-
- 'catalog-info.yaml'
19+
src-only:
20+
- '!(**/*.{md,asciidoc,txt}|*.{md,asciidoc,txt}|{docs,.ci,.buildkite,scripts}/**/*|catalog-info.yaml)'
21+
- '.github/workflows/**'
2822
2923
test:
3024
name: Test
3125
runs-on: ${{ matrix.os }}
3226
needs: paths-filter
33-
# only run if files not in `skip` filter were changed
34-
if: needs.paths-filter.outputs.skip != 'true'
27+
# only run if code relevant to unit tests was changed
28+
if: needs.paths-filter.outputs.src-only == 'true'
3529

3630
strategy:
3731
fail-fast: false

0 commit comments

Comments
 (0)