mirror of
https://github.com/dorny/paths-filter.git
synced 2025-06-08 18:09:04 +00:00
Adds ignore path functionality
This commit is contained in:
parent
b0bc141e31
commit
d748e34e85
10 changed files with 9748 additions and 32251 deletions
2
.github/workflows/build.yml
vendored
2
.github/workflows/build.yml
vendored
|
@ -11,7 +11,7 @@ jobs:
|
|||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- run: |
|
||||
npm install
|
||||
npm ci
|
||||
npm run all
|
||||
|
||||
self-test:
|
||||
|
|
35
.github/workflows/pull-request-verification.yml
vendored
35
.github/workflows/pull-request-verification.yml
vendored
|
@ -213,4 +213,37 @@ jobs:
|
|||
run: exit 1
|
||||
- name: changes-test
|
||||
if: contains(fromJSON(steps.filter.outputs.changes), 'error') || !contains(fromJSON(steps.filter.outputs.changes), 'any')
|
||||
run: exit 1
|
||||
run: exit 1
|
||||
- name: print context
|
||||
run: |
|
||||
echo "${{ tojson(steps.filter) }}"
|
||||
|
||||
test-ignore-changes:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- run: |
|
||||
echo "NEW FILE" > local.ts
|
||||
echo "IGNORE FILE" > local.md
|
||||
- run: git add local.ts local.md
|
||||
- uses: ./
|
||||
id: filter
|
||||
with:
|
||||
base: HEAD
|
||||
filters: '.github/filters.yml'
|
||||
- name: print context
|
||||
run: |
|
||||
echo "${{ tojson(steps.filter) }}"
|
||||
- name: filter-test
|
||||
if: steps.filter.outputs.any != 'true'
|
||||
run: exit 1
|
||||
- name: ignore-test
|
||||
if: steps.filter.outputs.anyignore_count != 1
|
||||
run: exit 1
|
||||
- name: ignore_testnull
|
||||
if: steps.filter.outputs.anyignorenull == true
|
||||
run: exit 1
|
||||
- name: ignore_testall
|
||||
if: steps.filter.outputs.anyignoreall_count != 2
|
||||
run: |
|
||||
exit 1
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue