# dorny/paths-filter

> Conditionally run actions based on files modified by PR, feature branch or pushed commits

Source: https://talira.ai/catalog/dorny-paths-filter-6e7hgcdd
Every listing: https://talira.ai/catalog.md

- Kind: Open source
- Types: Plugin
- Categories: [developer tools / ci / change detection](https://talira.ai/categories/developer-tools/ci/change-detection)
- Licence: MIT[^2]
- Pricing: Free and open source[^2]
- Free tier: yes[^2]
- Creator: Michal Dorner (dorny)

dorny/paths-filter (Paths Changes Filter) is a [GitHub Actions](https://talira.ai/catalog/github-actions-jgz14cgk.md) action that sets an output for each named filter of glob rules saying whether any changed file matches it, so later steps or whole jobs run only when their files changed; [GitHub](https://talira.ai/catalog/github-ppcgj756.md)'s own workflow path filters work only on whole workflows. On pull requests it gets the changed files from GitHub's REST API, compared with the pull request's base branch. On pushes, merge queues and other events it uses git against a base you choose (a branch, through the merge-base; a commit SHA; or, on a long-lived branch, the commit before the push), and needs the repository checked out. It can also count and list the matching files (CSV, JSON or shell arguments), match only added, modified or deleted files, and give a job matrix the names of the filters that matched.

## Links

- GitHub: https://github.com/dorny/paths-filter

## Problems it solves

- skip the test job when only docs changed
- run the frontend tests only when something under frontend/ changes in our monorepo
- GitHub's paths filter works on the whole workflow, but I need it on one job or step
- deploy a service only when its own folder changed in this push
- build a CI matrix of just the packages this pull request touched
- lint only the markdown files a pull request added or modified
- my GitHub Actions minutes run out because every push runs every job, even docs-only commits
- work out which parts of the repo changed in a merge queue run
- get the list of changed files in a pull request as a JSON array for the next step

## Features

- named filters of glob rules (picomatch), each with a true/false output and a _count output
- works on pull_request, pull_request_target, push, merge_group and other events
- changed files from the REST API on pull requests, or from git against a branch, tag or commit
- lists matching files as CSV, JSON or shell-escaped arguments
- rules by change type: added, modified or deleted
- changes output with the names of the matching filters, for a job matrix
- filters inline or in a separate YAML file
- predicate-quantifier: some, every or some-with-excludes

## Limitations

- Doesn't look at earlier workflow runs or whether they passed: it compares changed files against a base (the pull request's base branch, a merge-base or the commit before the push)[^1]

## Trust

Overall: 0.31 out of 1.
Signals: backing 0.40, extensibility 0.00.

- created by Michal Dorner (dorny)
- used by Sentry, GoogleChrome/web.dev

Warnings:

- GitHub activity not fetched yet

## Related

- Works with [GitHub Actions](https://talira.ai/catalog/github-actions-jgz14cgk.md)

## Alternatives

- [fkirc/skip-duplicate-actions](https://talira.ai/catalog/fkirc-skip-duplicate-actions-8atjz9n3.md): Save time and cost when using GitHub Actions

## Sources

[^1]: https://github.com/dorny/paths-filter (checked 20 Nov 2026)
[^2]: https://github.com/dorny/paths-filter/blob/master/LICENSE (checked 20 Nov 2026)
