diff --git a/.github/workflows/nodejs.yml b/.github/workflows/nodejs.yml index 4fe2b1236..92d2ca72b 100644 --- a/.github/workflows/nodejs.yml +++ b/.github/workflows/nodejs.yml @@ -2,31 +2,36 @@ name: Node CI on: - push: - paths-ignore: - - '**/*.md' - - '**/*.asciidoc' - - '**/*.txt' - - 'docs/**' - - '.ci/**' - - '.buildkite/**' - - 'scripts/**' - - 'catalog-info.yaml' - pull_request: - paths-ignore: - - '**/*.md' - - '**/*.asciidoc' - - '**/*.txt' - - 'docs/**' - - '.ci/**' - - '.buildkite/**' - - 'scripts/**' - - 'catalog-info.yaml' + pull_request: {} jobs: + paths-filter: + name: Detect files changed + runs-on: ubuntu-latest + outputs: + skip: '${{ steps.changes.outputs.skip }}' + 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' + 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' strategy: fail-fast: false @@ -35,7 +40,7 @@ jobs: os: [ubuntu-latest, windows-latest, macOS-latest] steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Use Node.js ${{ matrix.node-version }} uses: actions/setup-node@v3