changed-files
changed-files is a GitHub Action that detects which files and directories have been modified in a pull request or push event. It compares against a target branch or previous commits and outputs the results as lists, supporting large monorepos and offering glob pattern filtering.
Key facts
Objective fields from the source. Values we can't verify are shown as “Unknown” rather than guessed.
| Field | Value |
|---|---|
| Repository | tj-actions/changed-files |
| Owner | tj-actions |
| Primary language | TypeScript |
| License | MIT — OSI-approved |
| Stars | 2.7k |
| Forks | 330 |
| Open issues | 25 |
| Latest release | v47.0.6 (2026-04-18) |
| Last updated | 2026-07-03 |
| Source | https://github.com/tj-actions/changed-files |
What changed-files is
TypeScript-based GitHub Action leveraging Git's native diff commands or GitHub's REST API to identify changed files, with support for glob patterns, JSON/text output, directory traversal, and file restoration across Linux, macOS, and Windows runners.
Get the changed-files source
Clone the repository and explore it locally.
git clone https://github.com/tj-actions/changed-files.gitcd changed-files# follow the project's README for install & configurationNeed it deployed, integrated, or customized instead? DEV.co ships production installs.
Best use cases
Implementation considerations
- Configure actions/checkout fetch-depth appropriately: 0 for full history on push events, default 1 for pull requests on monorepos.
- Use glob patterns (Globstar, brace expansion, negation) to fine-tune which files trigger downstream jobs and reduce unnecessary runs.
- Enable persist-credentials: true in checkout if fetch-depth is not 0, ensuring Git operations can access remote branches.
- Set JSON output format for complex matrix job generation; use .txt output for simple downstream job condition evaluation.
- Test glob patterns locally or in a dev branch first—incorrect patterns may cause jobs to skip unexpectedly or match too broadly.
When to avoid it — and what to weigh
- Need to detect uncommitted local changes — This action detects only committed changes in Git history; use tj-actions/verify-changed-files for pending uncommitted modifications.
- Running on non-GitHub platforms — This is exclusively a GitHub Actions integration; it will not work on GitLab CI, CircleCI, Jenkins, or other CI/CD systems.
- Shallow clones with insufficient fetch depth — Push events require fetch-depth of 0 or 2; monorepos need careful checkout configuration to avoid missing commit history.
- Real-time file change streaming or webhooks — This is a synchronous action for workflow steps, not a streaming service or event-driven system for live file monitoring.
License & commercial use
MIT License—permissive open-source license allowing commercial use, modification, and redistribution with attribution and no warranty.
MIT license permits commercial use without restriction. No proprietary dependencies noted in provided data. Review project and any transitive dependencies for undisclosed restrictions before production deployment.
DEV.co evaluation signals
Editorial assessment — not user reviews. Directional, with an explicit confidence level.
| Signal | Assessment |
|---|---|
| Maintenance | Active |
| Documentation | Strong |
| License clarity | Clear |
| Deployment complexity | Low |
| DEV.co fit | Strong |
| Assessment confidence | High |
Action operates within GitHub Actions sandbox and accesses only local .git directory or GitHub's REST API using workflow-scoped tokens. No additional secrets or external network calls required. Review of transitive TypeScript dependencies and build process recommended before use in high-security environments.
Alternatives to consider
dorny/paths-filter
Alternative GitHub Action offering similar file change detection with glob filtering; compare feature parity and maintenance status for your use case.
GitHub's native path filters (if: contains(github.event.pull_request.title, 'keyword'))
Simpler but less powerful; use for basic branch/title-based conditionals when full file-level granularity is not needed.
Custom shell script + git diff/git log
Full control and no external action dependency; viable for simple two-branch comparisons but less maintainable for complex monorepos and cross-platform scenarios.
Build on changed-files with DEV.co software developers
Our DevOps engineers specialize in GitHub Actions automation, monorepo strategies, and optimized conditional workflows. Contact Devco to streamline your build pipelines today.
Talk to DEV.coRelated open-source tools
Surfaced by semantic similarity across the DEV.co open-source index.
Related on DEV.co
Explore the category and the services that help you build with it.
changed-files FAQ
Why is my job not running even though I changed files matching my pattern?
Does this action detect uncommitted changes in my workflow?
Can I use this in a non-GitHub CI system?
What is the typical execution time?
Work with a software development agency
Need help beyond evaluating changed-files? DEV.co is a software development agency offering software development services and web development for teams of every size. Our software developers and web developers build custom software, web applications, APIs, and open-source devops integrations — and maintain them long-term.
Need Expert Implementation of changed-files in Your CI/CD?
Our DevOps engineers specialize in GitHub Actions automation, monorepo strategies, and optimized conditional workflows. Contact Devco to streamline your build pipelines today.