mirror of
https://github.com/dorny/paths-filter.git
synced 2025-06-08 10:01:34 +00:00
Allow base and ref in PRs to override API behavior
This commit is contained in:
parent
4067d88573
commit
0f9f8bf7d2
4 changed files with 76 additions and 11 deletions
21
.github/workflows/pull-request-verification.yml
vendored
21
.github/workflows/pull-request-verification.yml
vendored
|
@ -139,3 +139,24 @@ jobs:
|
|||
|| steps.filter.outputs.modified_files != 'LICENSE'
|
||||
|| steps.filter.outputs.deleted_files != 'README.md'
|
||||
run: exit 1
|
||||
|
||||
test-baseref-changes:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- uses: ./
|
||||
id: filter
|
||||
with:
|
||||
base: ${{ github.base_ref }}
|
||||
ref: ${{ github.sha }}
|
||||
filters: |
|
||||
error:
|
||||
- not_existing_path/**/*
|
||||
any:
|
||||
- "**/*"
|
||||
- name: filter-test
|
||||
if: steps.filter.outputs.any != 'true' || steps.filter.outputs.error == 'true'
|
||||
run: exit 1
|
||||
- name: changes-test
|
||||
if: contains(fromJSON(steps.filter.outputs.changes), 'error') || !contains(fromJSON(steps.filter.outputs.changes), 'any')
|
||||
run: exit 1
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue