derekprior/Paths Guard
Re-checks workflow path filters at runtime. Cancels the workflow if the changed files don't match the paths configuration — a safety net for when GitHub can't compute the diff at trigger time.
View on GitHubTrust Signals
- Scorecard Score
- not yet scored
- Maintenance Recency
- Stale
- License
- None
Inputs
| name | description | required | default |
|---|---|---|---|
| token | GitHub token used to query changed files and cancel the workflow run. Requires `actions: write` permission. | yes | ${{ github.token }} |
| workflow-file | Explicit path to the workflow file (relative to repo root). If not set, automatically resolved from GITHUB_WORKFLOW_REF. | no | — |
| cancel | Whether to cancel the workflow run when path filters don't match. Set to 'false' to only set the should_run output without cancelling. Useful for job-level gating or integration testing. | no | true |
| fallback | Behavior when changed files cannot be determined (e.g., API failure). 'run' (default) allows the workflow to continue. 'cancel' cancels the workflow run. | no | run |
Outputs
| name | description |
|---|---|
| should_run | 'true' if the changed files match the workflow's path filters, 'false' otherwise. |