[![CI](https://github.com/tj-actions/changed-files/actions/workflows/test.yml/badge.svg)](https://github.com/tj-actions/changed-files/actions/workflows/test.yml) [![Update release version.](https://github.com/tj-actions/changed-files/actions/workflows/sync-release-version.yml/badge.svg)](https://github.com/tj-actions/changed-files/actions/workflows/sync-release-version.yml) [![Public workflows that use this action.](https://img.shields.io/endpoint?url=https%3A%2F%2Fused-by.vercel.app%2Fapi%2Fgithub-actions%2Fused-by%3Faction%3Dtj-actions%2Fchanged-files%26badge%3Dtrue)](https://github.com/search?o=desc\&q=tj-actions+changed-files+language%3AYAML\&s=\&type=Code)
Retrieve all changed files relative to the target branch (`pull_request*` based events) or the last remote commit (`push` based event) returning the **absolute path** to all changed files from the project root.
* Using [Glob pattern](https://docs.github.com/en/actions/learn-github-actions/workflow-syntax-for-github-actions#filter-pattern-cheat-sheet) matching.
> * For files located in a sub-directory ensure that the pattern specified contains `**` (globstar) to match any preceding directories or explicitly pass the full path relative to the project root. See: [#314](https://github.com/tj-actions/changed-files/issues/314)
| any\_changed | `string` | `true` OR `false` | Returns `true` when any <br/> of the filenames provided using <br/> the `files` input has changed. <br/> i.e. *using a combination of all added, <br />copied, modified and renamed files (ACMR)* |
| only\_changed | `string` | `true` OR `false` | Returns `true` when only <br/> files provided using <br/> the `files` input has changed. (ACMR) |
| other\_changed\_files | `string` | `'new.txt path/to/file.png ...'` | Select all other changed files <br/> not listed in the files input <br/> i.e. *a combination of all added, <br /> copied and modified files (ACMR)* |
| any\_modified | `string` | `true` OR `false` | Returns `true` when any <br/> of the filenames provided using <br/> the `files` input has been modified. <br/> i.e. *using a combination of all added, <br />copied, modified, renamed, and deleted files (ACMRD)* |
| only\_modified | `string` | `true` OR `false` | Returns `true` when only <br/> files provided using <br/> the `files` input has been modified. (ACMRD) |
| other\_modified\_files | `string` | `'new.txt path/to/file.png ...'` | Select all other modified files <br/> not listed in the files input <br/> i.e. *a combination of all added, <br /> copied, modified, and deleted files (ACMRD)* |
| any\_deleted | `string` | `true` OR `false` | Returns `true` when any <br/> of the filenames provided using <br/> the `files` input has been deleted. (D) |
| only\_deleted | `string` | `true` OR `false` | Returns `true` when only <br/> files provided using <br/> the `files` input has been deleted. (D) |
| other\_deleted\_files | `string` | `'new.txt path/to/file.png ...'` | Select all other deleted files <br/> not listed in the files input <br/> i.e. *a combination of all deleted files (D)* |
| all\_changed\_files | `string` | `'new.txt path/to/file.png ...'` | Select all changed files <br/> i.e. *a combination of all added, <br />copied, modified and renamed files (ACMR)* |
| all\_modified\_files | `string` | `'new.txt path/to/file.png ...'` | Select all changed files <br/> i.e. *a combination of all added, <br />copied, modified, renamed and deleted files (ACMRD)* |
| all\_changed\_and\_modified\_files | `string` | `'new.txt path/to/file.png ...'` | Select all changed <br/> and modified files <br/> i.e. *a combination of (ACMRDTUX)* |
| added\_files | `string` | `'new.txt path/to/file.png ...'` | Select only files that are Added (A) |
| copied\_files | `string` | `'new.txt path/to/file.png ...'` | Select only files that are Copied (C) |
| deleted\_files | `string` | `'new.txt path/to/file.png ...'` | Select only files that are Deleted (D) |
| modified\_files | `string` | `'new.txt path/to/file.png ...'` | Select only files that are Modified (M) |
| renamed\_files | `string` | `'new.txt path/to/file.png ...'` | Select only files that are Renamed (R) |
| type\_changed\_files | `string` | `'new.txt path/to/file.png ...'` | Select only files that have their file type changed (T) |
| unmerged\_files | `string` | `'new.txt path/to/file.png ...'` | Select only files that are Unmerged (U) |
| unknown\_files | `string` | `'new.txt path/to/file.png ...'` | Select only files that are Unknown (X) |
| files | `string` OR `string[]` | `false` | | Check for changes <br> using only these <br> list of file(s) <br> (Defaults to the <br> entire repo) |
| files\_separator | string | `false` | `'\n'` | Separator used to split the<br>`files` input |
| files\_from\_source\_file | `string` | `false` | | Source file(s) <br> used to populate <br> the `files` input |
| files\_ignore | string | `false` | | Ignore changes to these file(s) |
| files\_ignore\_separator | string | `false` | `'\n'` | Separator used to split the <br>`files-ignore` input |
| files\_ignore\_from\_source\_file | `string` | `false` | | Source file(s) <br> used to populate <br> the `files_ignore` input |
| sha | `string` | `true` | `${{ github.sha }}` | Specify a different <br> commit SHA <br> used for <br> comparing changes |
| base\_sha | `string` | `false` | | Specify a different <br> base commit SHA <br> used for <br> comparing changes |
| path | `string` | `false` | | Relative path under <br>`GITHUB_WORKSPACE`<br> to the repository |
| since\_last\_remote\_commit | `string` | `false` | `false` | Use the last commit on the remote <br> branch as the `base_sha`<br> (Defaults to the previous commit). <br/> NOTE: This requires <br/>`fetch-depth: 0`<br/> with `actions/checkout@v2` |
| use\_fork\_point | `string` | `false` | `false` | Finds best common ancestor <br/> between two commits <br/> to use in a three-way merge <br/> as the `base_sha`<br/> See: [git merge-base](https://git-scm.com/docs/git-merge-base#Documentation/git-merge-base.txt---fork-point). NOTE: This pulls the entire commit history of the base branch |
This project follows a `v(major).(patch)` versioning scheme with the exception of pointing the git ref of the latest patch release to the major version tag.
> * Users referencing the legacy `v1.x.x` -> `v5.0.0` semantic versions, are required to switch over to `v10.x` -> `v15.x` respectively as new releases would no longer be deployed using the old versioning scheme.
> * A breaking change was introduced in `v1.1.4` and `v13.x` which has been fixed.