2022-04-08 05:43:01 -04:00
name : Changed Files
2023-06-19 09:48:20 -06:00
description : Get all Added, Copied, Modified, Deleted, Renamed, Type changed, Unmerged, and Unknown files.
2021-03-04 21:36:52 -05:00
author : tj-actions
2021-10-21 12:00:00 -04:00
2021-03-04 21:36:52 -05:00
inputs :
2021-03-05 07:25:17 -05:00
separator :
2023-11-19 20:05:34 -07:00
description : "Split character for output strings."
2022-05-14 14:33:40 -04:00
required : false
2021-03-05 07:25:17 -05:00
default : " "
2022-05-25 17:47:58 -04:00
include_all_old_new_renamed_files :
2023-11-15 08:38:50 -07:00
description : "Include `all_old_new_renamed_files` output. Note this can generate a large output See: #501."
2022-05-25 17:47:58 -04:00
required : false
2022-06-12 10:08:13 -04:00
default : "false"
2022-05-14 15:24:13 -04:00
old_new_separator :
2022-10-29 15:48:36 -06:00
description : "Split character for old and new filename pairs."
2022-05-14 14:33:40 -04:00
required : false
default : ","
2022-05-14 15:24:13 -04:00
old_new_files_separator :
2022-12-05 15:15:35 -07:00
description : "Split character for old and new renamed filename pairs."
2022-05-14 15:24:13 -04:00
required : false
default : " "
2021-07-17 11:46:59 -04:00
files_from_source_file :
2022-10-29 15:48:36 -06:00
description : "Source file(s) used to populate the `files` input."
2021-07-17 10:51:08 -04:00
required : false
default : ""
2023-05-25 12:22:24 -06:00
files_from_source_file_separator :
2023-11-19 20:05:34 -07:00
description : "Separator used to split the `files_from_source_file` input."
2023-05-25 12:22:24 -06:00
default : "\n"
required : false
2021-04-30 12:04:23 -04:00
files :
2023-11-15 08:38:50 -07:00
description : |
2023-11-16 08:02:45 -07:00
File and directory patterns used to detect changes (Defaults to the entire repo if unset).
2023-11-15 08:38:50 -07:00
NOTE : Multiline file/directory patterns should not include quotes.
2021-04-30 12:04:23 -04:00
required : false
default : ""
2022-02-14 22:33:45 -05:00
files_separator :
2022-10-29 15:48:36 -06:00
description : "Separator used to split the `files` input"
2022-02-07 22:52:51 -05:00
default : "\n"
required : false
2023-06-16 00:17:13 -06:00
files_yaml :
description : "YAML used to define a set of file patterns to detect changes"
required : false
default : ""
files_yaml_from_source_file :
2023-11-15 08:38:50 -07:00
description : "Source file(s) used to populate the `files_yaml` input. Example: https://github.com/tj-actions/changed-files/blob/main/test/changed-files.yml"
2023-06-16 00:17:13 -06:00
required : false
default : ""
files_yaml_from_source_file_separator :
description : 'Separator used to split the `files_yaml_from_source_file` input'
default : "\n"
required : false
files_ignore_yaml :
description : "YAML used to define a set of file patterns to ignore changes"
required : false
default : ""
files_ignore_yaml_from_source_file :
2023-11-15 08:38:50 -07:00
description : "Source file(s) used to populate the `files_ignore_yaml` input. Example: https://github.com/tj-actions/changed-files/blob/main/test/changed-files.yml"
2023-06-16 00:17:13 -06:00
required : false
default : ""
files_ignore_yaml_from_source_file_separator :
description : 'Separator used to split the `files_ignore_yaml_from_source_file` input'
default : "\n"
required : false
2022-02-14 22:33:45 -05:00
files_ignore :
2023-11-16 08:02:45 -07:00
description : "Ignore changes to these file(s). NOTE: Multiline file/directory patterns should not include quotes."
2022-02-14 22:33:45 -05:00
required : false
default : ""
files_ignore_separator :
2022-12-15 13:10:14 -07:00
description : "Separator used to split the `files_ignore` input"
2022-02-14 22:33:45 -05:00
default : "\n"
required : false
files_ignore_from_source_file :
2022-10-29 15:48:36 -06:00
description : "Source file(s) used to populate the `files_ignore` input"
2022-02-14 22:33:45 -05:00
required : false
default : ""
2023-05-25 12:22:24 -06:00
files_ignore_from_source_file_separator :
description : 'Separator used to split the `files_ignore_from_source_file` input'
default : "\n"
required : false
2021-07-14 23:57:17 +03:00
sha :
2023-10-26 06:28:05 -06:00
description : "Specify a different commit SHA or branch used for comparing changes"
2022-11-06 13:16:38 +09:00
required : false
2021-07-17 11:46:59 -04:00
base_sha :
2023-10-26 06:28:05 -06:00
description : "Specify a different base commit SHA or branch used for comparing changes"
2021-07-17 11:46:59 -04:00
required : false
2022-08-20 20:23:21 -06:00
since :
2022-10-29 15:48:36 -06:00
description : "Get changed files for commits whose timestamp is older than the given time."
2022-08-20 20:23:21 -06:00
required : false
2022-09-07 09:43:10 -06:00
default : ""
2022-08-20 20:23:21 -06:00
until :
2022-10-29 15:48:36 -06:00
description : "Get changed files for commits whose timestamp is earlier than the given time."
2022-08-20 20:23:21 -06:00
required : false
2022-09-07 09:43:10 -06:00
default : ""
2021-08-28 04:53:03 +03:00
path :
2022-10-29 15:48:36 -06:00
description : "Specify a relative path under `$GITHUB_WORKSPACE` to locate the repository."
2021-08-28 04:53:03 +03:00
required : false
2022-06-12 10:08:13 -04:00
default : "."
2022-04-28 02:08:15 -04:00
quotepath :
2023-11-15 12:41:33 -07:00
description : "Use non-ASCII characters to match files and output the filenames completely verbatim by setting this to `false`"
2022-06-12 10:08:13 -04:00
default : "true"
2022-04-28 02:08:15 -04:00
required : false
2022-06-02 12:13:45 -04:00
diff_relative :
2023-11-15 12:41:33 -07:00
description : "Exclude changes outside the current directory and show path names relative to it. NOTE: This requires you to specify the top-level directory via the `path` input."
2022-06-12 10:08:13 -04:00
required : false
2023-05-25 12:22:24 -06:00
default : "true"
2022-06-12 10:08:13 -04:00
dir_names :
default : "false"
2023-11-15 12:41:33 -07:00
description : "Output unique changed directories instead of filenames. NOTE: This returns `.` for changed files located in the current working directory which defaults to `$GITHUB_WORKSPACE`."
2022-06-02 12:13:45 -04:00
required : false
2022-11-23 17:25:26 -07:00
dir_names_max_depth :
2023-06-05 18:01:34 -06:00
description : "Limit the directory output to a maximum depth e.g `test/test1/test2` with max depth of `2` returns `test/test1`."
2022-11-23 17:25:26 -07:00
required : false
2023-06-06 06:00:56 -06:00
dir_names_exclude_current_dir :
description : "Exclude the current directory represented by `.` from the output when `dir_names` is set to `true`."
required : false
default : "false"
2023-08-21 21:11:59 -06:00
dir_names_include_files :
2023-11-15 12:41:33 -07:00
description : "File and directory patterns to include in the output when `dir_names` is set to `true`. NOTE: This returns only the matching files and also the directory names."
2023-08-21 21:11:59 -06:00
required : false
default : ""
dir_names_include_files_separator :
description : "Separator used to split the `dir_names_include_files` input"
default : "\n"
required : false
2023-09-21 21:49:28 -06:00
dir_names_deleted_files_include_only_deleted_dirs :
2023-09-22 10:06:29 -06:00
description : "Include only directories that have been deleted as opposed to directory names of files that have been deleted in the `deleted_files` output when `dir_names` is set to `true`."
2023-09-21 21:49:28 -06:00
required : false
default : "false"
2022-08-03 14:01:40 -06:00
json :
2024-02-07 04:18:39 +01:00
description : "Output list of changed files in a JSON formatted string which can be used for matrix jobs. Example: https://github.com/tj-actions/changed-files/blob/main/.github/workflows/matrix-example.yml"
2022-08-03 14:01:40 -06:00
required : false
default : "false"
2023-05-25 12:22:24 -06:00
escape_json :
description : "Escape JSON output."
2022-12-30 06:27:08 +01:00
required : false
2023-05-25 12:22:24 -06:00
default : "true"
2023-12-22 22:07:32 +01:00
safe_output :
description : "Apply sanitization to output filenames before being set as output."
required : false
default : "true"
2022-11-03 06:31:50 -06:00
fetch_depth :
2023-11-15 12:41:33 -07:00
description : "Depth of additional branch history fetched. NOTE: This can be adjusted to resolve errors with insufficient history."
2022-10-12 12:39:24 -06:00
required : false
2024-04-19 22:15:07 -06:00
default : "25"
2023-07-09 03:19:14 -06:00
skip_initial_fetch :
2023-11-15 08:38:50 -07:00
description : |
2024-02-17 21:58:39 -07:00
Skip initially fetching additional history to improve performance for shallow repositories.
NOTE : This could lead to errors with missing history. It's intended to be used when you've fetched all necessary history to perform the diff.
2023-07-09 03:19:14 -06:00
required : false
default : "false"
2023-08-23 15:04:44 -06:00
fetch_additional_submodule_history :
description : "Fetch additional history for submodules."
required : false
default : "false"
2022-11-06 19:50:53 -07:00
since_last_remote_commit :
2023-06-16 00:17:13 -06:00
description : "Use the last commit on the remote branch as the `base_sha`. Defaults to the last non-merge commit on the target branch for pull request events and the previous remote commit of the current branch for push events."
2023-01-10 12:38:39 -07:00
required : false
2022-11-06 19:50:53 -07:00
default : "false"
2022-12-19 10:51:22 -07:00
write_output_files :
2023-11-15 12:41:33 -07:00
description : "Write outputs to the `output_dir` defaults to `.github/outputs` folder. NOTE: This creates a `.txt` file by default and a `.json` file if `json` is set to `true`."
2022-12-19 10:51:22 -07:00
required : false
default : "false"
output_dir :
description : "Directory to store output files."
required : false
default : ".github/outputs"
2023-06-14 13:59:31 -06:00
output_renamed_files_as_deleted_and_added :
description : "Output renamed files as deleted and added files."
required : false
default : "false"
2023-06-16 18:57:12 -06:00
recover_deleted_files :
description : "Recover deleted files."
required : false
default : "false"
recover_deleted_files_to_destination :
description : "Recover deleted files to a new destination directory, defaults to the original location."
required : false
default : ""
2023-07-19 01:50:59 -06:00
recover_files :
2023-11-15 08:38:50 -07:00
description : |
File and directory patterns used to recover deleted files,
defaults to the patterns provided via the `files`, `files_from_source_file`, `files_ignore` and `files_ignore_from_source_file` inputs
or all deleted files if no patterns are provided.
2023-07-19 01:50:59 -06:00
required : false
default : ""
recover_files_separator :
description : "Separator used to split the `recover_files` input"
default : "\n"
required : false
recover_files_ignore :
description : "File and directory patterns to ignore when recovering deleted files."
required : false
default : ""
recover_files_ignore_separator :
description : "Separator used to split the `recover_files_ignore` input"
default : "\n"
required : false
2023-06-23 11:20:13 -06:00
token :
2023-11-15 08:38:50 -07:00
description : "GitHub token used to fetch changed files from Github's API."
2023-06-23 11:20:13 -06:00
required : false
default : ${{ github.token }}
api_url :
description : "Github API URL."
required : false
default : ${{ github.api_url }}
2024-01-13 01:48:42 -07:00
use_rest_api :
description : "Force the use of Github's REST API even when a local copy of the repository exists"
required : false
default : "false"
2023-08-30 14:51:36 -06:00
fail_on_initial_diff_error :
description : "Fail when the initial diff fails."
required : false
default : "false"
fail_on_submodule_diff_error :
description : "Fail when the submodule diff fails."
required : false
default : "false"
2023-11-03 14:19:40 -06:00
negation_patterns_first :
2023-11-15 12:41:33 -07:00
description : "Apply the negation patterns first. NOTE: This affects how changed files are matched."
2023-11-03 14:19:40 -06:00
required : false
default : "false"
2024-03-08 18:20:45 -07:00
matrix :
description : "Output changed files in a format that can be used for matrix jobs. Alias for setting inputs `json` to `true` and `escape_json` to `false`."
required : false
default : "false"
2024-04-17 10:24:26 -06:00
exclude_submodules :
description : "Exclude changes to submodules."
required : false
default : "false"
2024-04-18 12:45:07 -06:00
fetch_missing_history_max_retries :
description : "Maximum number of retries to fetch missing history."
required : false
2024-04-19 22:15:07 -06:00
default : "20"
2024-04-18 15:03:38 -06:00
use_posix_path_separator :
2024-04-19 22:15:07 -06:00
description : "Use POSIX path separator `/` for output file paths on Windows."
2024-04-18 15:03:38 -06:00
required : false
default : "false"
2024-05-20 22:17:52 -06:00
tags_pattern :
description : "Tags pattern to include."
required : false
default : "*"
tags_ignore_pattern :
description : "Tags pattern to ignore."
required : false
default : ""
2021-03-05 07:25:17 -05:00
2021-03-04 22:43:17 -05:00
outputs :
added_files :
2022-10-29 15:48:36 -06:00
description : "Returns only files that are Added (A)."
2023-06-16 21:13:40 -06:00
added_files_count :
description : "Returns the number of `added_files`"
2021-03-04 22:43:17 -05:00
copied_files :
2022-10-29 15:48:36 -06:00
description : "Returns only files that are Copied (C)."
2023-06-16 21:13:40 -06:00
copied_files_count :
description : "Returns the number of `copied_files`"
2021-03-04 22:43:17 -05:00
deleted_files :
2022-10-29 15:48:36 -06:00
description : "Returns only files that are Deleted (D)."
2023-06-16 21:13:40 -06:00
deleted_files_count :
description : "Returns the number of `deleted_files`"
2021-03-04 22:43:17 -05:00
modified_files :
2022-10-29 15:48:36 -06:00
description : "Returns only files that are Modified (M)."
2023-06-16 21:13:40 -06:00
modified_files_count :
description : "Returns the number of `modified_files`"
2021-03-04 22:43:17 -05:00
renamed_files :
2022-10-29 15:48:36 -06:00
description : "Returns only files that are Renamed (R)."
2023-06-16 21:13:40 -06:00
renamed_files_count :
description : "Returns the number of `renamed_files`"
2022-05-14 17:54:38 -04:00
all_old_new_renamed_files :
2023-06-16 00:17:13 -06:00
description : "Returns only files that are Renamed and lists their old and new names. **NOTE:** This requires setting `include_all_old_new_renamed_files` to `true`. Also, keep in mind that this output is global and wouldn't be nested in outputs generated when the `*_yaml_*` input is used. (R)"
2023-06-16 21:13:40 -06:00
all_old_new_renamed_files_count :
description : "Returns the number of `all_old_new_renamed_files`"
2021-06-18 19:28:02 -04:00
type_changed_files :
2022-10-29 15:48:36 -06:00
description : "Returns only files that have their file type changed (T)."
2023-06-16 21:13:40 -06:00
type_changed_files_count :
description : "Returns the number of `type_changed_files`"
2021-03-04 22:43:17 -05:00
unmerged_files :
2022-10-29 15:48:36 -06:00
description : "Returns only files that are Unmerged (U)."
2023-06-16 21:13:40 -06:00
unmerged_files_count :
description : "Returns the number of `unmerged_files`"
2021-03-04 22:43:17 -05:00
unknown_files :
2022-10-29 15:48:36 -06:00
description : "Returns only files that are Unknown (X)."
2023-06-16 21:13:40 -06:00
unknown_files_count :
description : "Returns the number of `unknown_files`"
2021-09-04 09:42:11 -04:00
all_changed_and_modified_files :
2024-03-26 16:15:39 -06:00
description : "Returns all changed and modified files i.e. a combination of (ACMRDTUX)"
2023-06-16 21:13:40 -06:00
all_changed_and_modified_files_count :
description : "Returns the number of `all_changed_and_modified_files`"
2021-12-14 00:21:49 -05:00
all_changed_files :
2024-03-26 19:50:35 -06:00
description : "Returns all changed files i.e. a combination of all added, copied, modified and renamed files (ACMR)"
2023-06-16 21:13:40 -06:00
all_changed_files_count :
description : "Returns the number of `all_changed_files`"
2021-05-01 13:32:09 -04:00
any_changed :
2024-03-13 16:19:50 -06:00
description : "Returns `true` when any of the filenames provided using the `files*` or `files_ignore*` inputs have changed. This defaults to `true` when no patterns are specified. i.e. *includes a combination of all added, copied, modified and renamed files (ACMR)*."
2021-07-17 15:13:26 -04:00
only_changed :
2024-02-05 12:42:54 -07:00
description : "Returns `true` when only files provided using the `files*` or `files_ignore*` inputs have changed. i.e. *includes a combination of all added, copied, modified and renamed files (ACMR)*."
2021-07-17 15:13:26 -04:00
other_changed_files :
2024-03-26 19:50:35 -06:00
description : "Returns all other changed files not listed in the files input i.e. includes a combination of all added, copied, modified and renamed files (ACMR)."
2023-06-16 21:13:40 -06:00
other_changed_files_count :
description : "Returns the number of `other_changed_files`"
2021-12-14 02:01:31 -05:00
all_modified_files :
2024-03-26 19:50:35 -06:00
description : "Returns all changed files i.e. a combination of all added, copied, modified, renamed and deleted files (ACMRD)."
2023-06-16 21:13:40 -06:00
all_modified_files_count :
description : "Returns the number of `all_modified_files`"
2021-12-14 02:01:31 -05:00
any_modified :
2024-03-13 16:19:50 -06:00
description : "Returns `true` when any of the filenames provided using the `files*` or `files_ignore*` inputs have been modified. This defaults to `true` when no patterns are specified. i.e. *includes a combination of all added, copied, modified, renamed, and deleted files (ACMRD)*."
2021-12-14 02:01:31 -05:00
only_modified :
2024-03-13 16:19:50 -06:00
description : "Returns `true` when only files provided using the `files*` or `files_ignore*` inputs have been modified. (ACMRD)."
2021-12-14 02:01:31 -05:00
other_modified_files :
2024-03-26 16:15:39 -06:00
description : "Returns all other modified files not listed in the files input i.e. a combination of all added, copied, modified, and deleted files (ACMRD)"
2023-06-16 21:13:40 -06:00
other_modified_files_count :
description : "Returns the number of `other_modified_files`"
2021-09-05 08:22:47 -04:00
any_deleted :
2024-03-13 16:19:50 -06:00
description : "Returns `true` when any of the filenames provided using the `files*` or `files_ignore*` inputs have been deleted. This defaults to `true` when no patterns are specified. (D)"
2021-09-05 08:22:47 -04:00
only_deleted :
2024-03-13 16:19:50 -06:00
description : "Returns `true` when only files provided using the `files*` or `files_ignore*` inputs have been deleted. (D)"
2021-09-05 08:22:47 -04:00
other_deleted_files :
2024-03-26 16:15:39 -06:00
description : "Returns all other deleted files not listed in the files input i.e. a combination of all deleted files (D)"
2023-06-16 21:13:40 -06:00
other_deleted_files_count :
description : "Returns the number of `other_deleted_files`"
2023-09-18 14:17:46 -06:00
modified_keys :
2024-03-26 16:15:39 -06:00
description : "Returns all modified YAML keys when the `files_yaml` input is used. i.e. key that contains any path that has either been added, copied, modified, and deleted (ACMRD)"
2023-09-18 14:17:46 -06:00
changed_keys :
2024-03-26 16:15:39 -06:00
description : "Returns all changed YAML keys when the `files_yaml` input is used. i.e. key that contains any path that has either been added, copied, modified, and renamed (ACMR)"
2021-03-04 21:36:52 -05:00
runs :
2023-09-04 15:29:37 -06:00
using : 'node20'
2023-05-25 12:22:24 -06:00
main : 'dist/index.js'
2021-03-05 05:58:42 -05:00
2021-03-04 21:36:52 -05:00
branding :
2021-04-23 06:55:01 -04:00
icon : file-text
2021-03-04 21:36:52 -05:00
color : white