Allow base and ref in PRs to override API behavior

This commit is contained in:
Alden Quimby 2023-05-11 15:27:48 -04:00
parent 4067d88573
commit 0f9f8bf7d2
4 changed files with 76 additions and 11 deletions

View file

@ -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