:octocat: Github action to retrieve all (added, copied, modified, deleted, renamed, type changed, unmerged, unknown) files and directories.
:octocat: Github action to retrieve all (added, copied, modified, deleted, renamed, type changed, unmerged, unknown) files and directories.
Effortlessly track all changed files and directories relative to a target branch, the current branch (preceding commit or the last remote commit), multiple branches, or custom commits returning relative paths from the project root using this GitHub action.
[!NOTE]
This action solely identifies files that have changed for events such as
pull_request*,push,merge_group,release, and many more. However, it doesn't detect pending uncommitted changes created during the workflow execution.See: https://github.com/tj-actions/verify-changed-files instead.
.txt or .json file for further processing.And many more...
[!IMPORTANT]
- Push Events: When configuring
actions/checkout, make sure to setfetch-depthto either0or2, depending on your use case.- Mono Repositories: To avoid pulling the entire branch history, you can utilize the default
actions/checkout'sfetch-depthof1forpull_requestevents.- Quoting Multiline Inputs: Avoid using single or double quotes for multiline inputs. The value is already a string separated by a newline character. Refer to the Examples section for more information.
- Credentials Persistence: If
fetch-depthis not set to 0, make sure to setpersist-credentialstotruewhen configuringactions/checkout.- Matching Files and Folders: To match all files and folders under a directory, this requires a globstar pattern e.g.
dir_name/**which matches any number of subdirectories and files.
Visit the discussions for more information or create a new discussion for usage-related questions.
pull_requestDetect changes to all files in a Pull request relative to the target branch or since the last pushed commit.
……push ⬆️Detect changes to files made since the last pushed commit.
…To access more examples, navigate to the Examples section.
If you feel generous and want to show some extra appreciation:
Support this project with a :star:
[!IMPORTANT]
- When using
files_yaml*inputs:
All keys must start with a letter or
_and contain only alphanumeric characters,-, or_.For example,
testortest_keyortest-keyor_test_keyare all valid choices.
…| Acronym | Meaning |
|---|---|
| A | Added |
| C | Copied |
| M | Modified |
| D | Deleted |
| R | Renamed |
| T | Type changed |
| U | Unmerged |
| X | Unknown |
[!IMPORTANT]
- When using
files_yaml*inputs:
it's required to prefix all outputs with the key to ensure that the correct outputs are accessible.
For example, if you use
testas the key, you can access outputs likeadded_files,any_changed, and so on by prefixing them with the keytest_added_filesortest_any_changedetc.
| OUTPUT | TYPE | DESCRIPTION |
|---|---|---|
| added_files | string | Returns only files that are Added (A). |
| added_files_count | string | Returns the number of added_files |
| all_changed_and_modified_files | string | Returns all changed and modified files i.e. a combination of (ACMRDTUX) |
| all_changed_and_modified_files_count | string | Returns the number of all_changed_and_modified_files |
| all_changed_files | string | Returns all changed files i.e. a combination of all added, copied, modified and renamed files (ACMR) |
| all_changed_files_count | string |
No open issues yet, or sync has not completed.