
opened, closed, or assigned:


Filters and Activity Types Overview
| Event | Activity Types (types) | Branch Filters | Path Filters |
|---|---|---|---|
| push | — | branches, branches-ignore | paths, paths-ignore |
| pull_request | opened, closed, … | branches, branches-ignore | paths, paths-ignore |
Sample Workflow: workflowfilters.yaml
Using filters helps reduce unnecessary workflow runs and speeds up your feedback loop.
1. Push Event Filtering
Thepush event can be scoped by branch patterns:
branches: include only these branches.branches-ignore: exclude matching branches.paths: include only if specified files change.paths-ignore: exclude if only specified files change.
main pushes, ignore feature/* branches.
main, the workflow runs:

feature/... branches is ignored:

2. Pull Request Activity Types and Path Filters
You can refinepull_request triggers by:
types: run workflows on specific PR actions (opened,closed, etc.).branches: target only certain base branches.paths/paths-ignore: filter by file changes.
2.1 PR with Only README.md Changes
If a PR only updatesREADME.md, the workflow is skipped:



If your
paths-ignore list is too broad, you might inadvertently skip critical runs. Always test your filters in a separate branch.3. PR with Other File Changes
When a PR includes changes beyondREADME.md—for example, adding ASCII artwork—the workflow triggers on open:


hello job runs successfully:

closed is included in types, closing the PR also triggers the workflow:
