Skip to content

Commit

Permalink
Path filtering improvement (#2059)
Browse files Browse the repository at this point in the history
* Another attempt at getting path filtering right

* Improve filters
  • Loading branch information
JoshMock authored Nov 3, 2023
1 parent ab10e46 commit 99bcff0
Showing 1 changed file with 6 additions and 12 deletions.
18 changes: 6 additions & 12 deletions .github/workflows/nodejs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,29 +9,23 @@ jobs:
name: Detect files changed
runs-on: ubuntu-latest
outputs:
skip: '${{ steps.changes.outputs.skip }}'
src-only: '${{ steps.changes.outputs.src-only }}'
steps:
- uses: actions/checkout@v4
- uses: dorny/paths-filter/@v2.11.1
id: changes
with:
filters: |
skip:
- '**/*.md'
- '**/*.asciidoc'
- '**/*.txt'
- 'docs/**'
- '.ci/**'
- '.buildkite/**'
- 'scripts/**'
- 'catalog-info.yaml'
src-only:
- '!(**/*.{md,asciidoc,txt}|*.{md,asciidoc,txt}|{docs,.ci,.buildkite,scripts}/**/*|catalog-info.yaml)'
- '.github/workflows/**'
test:
name: Test
runs-on: ${{ matrix.os }}
needs: paths-filter
# only run if files not in `skip` filter were changed
if: needs.paths-filter.outputs.skip != 'true'
# only run if code relevant to unit tests was changed
if: needs.paths-filter.outputs.src-only == 'true'

strategy:
fail-fast: false
Expand Down

0 comments on commit 99bcff0

Please sign in to comment.