Interview Prep/GitHub Actions/Triggers & Events

How do path filters work, and what are their limits?

AdvancedConceptTriggers & Events
Answer

paths runs the workflow only if at least one changed file matches; paths-ignore skips if all changed files match. Combined with branches, both must match. Limits that bite:

  • Only the first 300 changed files in a diff are evaluated, so huge PRs may not trigger.
  • On push of a new branch, the diff is computed against the default branch tip or is unavailable, so behaviour can differ.
  • Tag pushes ignore path filters (paths do not apply to tags).
  • A workflow skipped by path filters never reports a check, so a required check stays "Expected — Waiting for status to be reported".
All GitHub Actions questions Roadmap: GitHub Actions

More on Triggers & Events