ci: Fix paths filter

This commit is contained in:
nosamu 2023-08-26 05:58:31 -05:00 committed by Nathan Adams
parent 04f93737c4
commit 5a10ccb22a
2 changed files with 13 additions and 10 deletions

View File

@ -15,20 +15,23 @@ jobs:
name: Paths filter name: Paths filter
runs-on: ubuntu-22.04 runs-on: ubuntu-22.04
outputs: outputs:
src: ${{ steps.filter.outputs.src }} should_run: ${{ steps.filter.outputs.src }}
steps: steps:
- uses: actions/checkout@v3 - uses: actions/checkout@v3
- uses: dorny/paths-filter@v2 - uses: AurorNZ/paths-filter@v3
id: filter id: filter
with: with:
filters: | filters: |
src: src:
- '!(web/package.json|web/package-lock.json|web/packages/**|**.md)' - '!web/package.json'
- '!web/package-lock.json'
- '!web/packages/**'
- '!**/*.md'
build: build:
needs: changes needs: changes
if: needs.changes.outputs.src == 'true' if: needs.changes.outputs.should_run== 'true'
name: Test Rust ${{ matrix.rust_version }} / ${{ matrix.os }} name: Test Rust ${{ matrix.rust_version }} / ${{ matrix.os }}
runs-on: ${{ matrix.os }} runs-on: ${{ matrix.os }}
continue-on-error: ${{ matrix.rust_version == 'nightly' || matrix.rust_version == 'beta' }} continue-on-error: ${{ matrix.rust_version == 'nightly' || matrix.rust_version == 'beta' }}
@ -91,7 +94,7 @@ jobs:
check-required: check-required:
needs: changes needs: changes
if: needs.changes.outputs.src == 'false' if: needs.changes.outputs.should_run == 'false'
name: Test Rust ${{ matrix.rust_version }} / ${{ matrix.os }} name: Test Rust ${{ matrix.rust_version }} / ${{ matrix.os }}
runs-on: ${{ matrix.os }} runs-on: ${{ matrix.os }}
strategy: strategy:

View File

@ -15,20 +15,20 @@ jobs:
name: Paths filter name: Paths filter
runs-on: ubuntu-22.04 runs-on: ubuntu-22.04
outputs: outputs:
src: ${{ steps.filter.outputs.src }} should_run: ${{ steps.filter.outputs.src }}
steps: steps:
- uses: actions/checkout@v3 - uses: actions/checkout@v3
- uses: dorny/paths-filter@v2 - uses: AurorNZ/paths-filter@v3
id: filter id: filter
with: with:
filters: | filters: |
src: src:
- '!**.md' - '!**/*.md'
build: build:
needs: changes needs: changes
if: needs.changes.outputs.src == 'true' if: needs.changes.outputs.should_run == 'true'
name: Test Node.js ${{ matrix.node_version }} / Rust ${{ matrix.rust_version }} / ${{ matrix.os }} name: Test Node.js ${{ matrix.node_version }} / Rust ${{ matrix.rust_version }} / ${{ matrix.os }}
runs-on: ${{ matrix.os }} runs-on: ${{ matrix.os }}
continue-on-error: ${{ matrix.rust_version == 'nightly' }} continue-on-error: ${{ matrix.rust_version == 'nightly' }}
@ -99,7 +99,7 @@ jobs:
check-required: check-required:
needs: changes needs: changes
if: needs.changes.outputs.src == 'false' if: needs.changes.outputs.should_run == 'false'
name: Test Node.js ${{ matrix.node_version }} / Rust ${{ matrix.rust_version }} / ${{ matrix.os }} name: Test Node.js ${{ matrix.node_version }} / Rust ${{ matrix.rust_version }} / ${{ matrix.os }}
runs-on: ${{ matrix.os }} runs-on: ${{ matrix.os }}
strategy: strategy: