2021-04-04 13:00:53 +00:00
|
|
|
name: Changed files
|
2021-07-18 01:33:35 +00:00
|
|
|
description: Get all changed files for push and pull request events.
|
2021-03-05 02:36:52 +00:00
|
|
|
author: tj-actions
|
|
|
|
inputs:
|
2021-05-06 12:44:56 +00:00
|
|
|
token:
|
|
|
|
description: 'Github token'
|
|
|
|
required: true
|
|
|
|
default: ${{ github.token }}
|
2021-03-05 12:25:17 +00:00
|
|
|
separator:
|
|
|
|
description: 'Split character for array output'
|
2021-03-05 02:36:52 +00:00
|
|
|
required: true
|
2021-03-05 12:25:17 +00:00
|
|
|
default: " "
|
2021-07-17 15:46:59 +00:00
|
|
|
files_from_source_file:
|
2021-07-17 14:51:08 +00:00
|
|
|
description: 'Source file to populate the files input'
|
|
|
|
required: false
|
|
|
|
default: ""
|
2021-04-30 16:04:23 +00:00
|
|
|
files:
|
2021-06-21 22:36:10 +00:00
|
|
|
description: 'Check for changes using only this list of files (Defaults to the entire repo)'
|
2021-04-30 16:04:23 +00:00
|
|
|
required: false
|
|
|
|
default: ""
|
2021-07-14 20:57:17 +00:00
|
|
|
sha:
|
2021-07-17 15:46:59 +00:00
|
|
|
description: 'Specify a current commit SHA used for comparing changes'
|
2021-07-14 20:57:17 +00:00
|
|
|
required: true
|
|
|
|
default: ${{ github.sha }}
|
2021-07-17 15:46:59 +00:00
|
|
|
base_sha:
|
|
|
|
description: 'Specify a base commit SHA on used for comparing changes'
|
|
|
|
required: false
|
2021-08-28 01:53:03 +00:00
|
|
|
path:
|
|
|
|
description: 'Specify a relative path under $GITHUB_WORKSPACE to locate the repository'
|
|
|
|
required: false
|
2021-03-05 12:25:17 +00:00
|
|
|
|
2021-03-05 03:43:17 +00:00
|
|
|
outputs:
|
|
|
|
added_files:
|
|
|
|
description: List of added files.
|
2021-06-18 14:19:28 +00:00
|
|
|
value: ${{ steps.changed-files.outputs.added_files }}
|
2021-03-05 03:43:17 +00:00
|
|
|
copied_files:
|
|
|
|
description: List of copied files.
|
2021-06-18 14:19:28 +00:00
|
|
|
value: ${{ steps.changed-files.outputs.copied_files }}
|
2021-03-05 03:43:17 +00:00
|
|
|
deleted_files:
|
|
|
|
description: List of deleted files.
|
2021-06-18 14:19:28 +00:00
|
|
|
value: ${{ steps.changed-files.outputs.deleted_files }}
|
2021-03-05 03:43:17 +00:00
|
|
|
modified_files:
|
2021-03-05 11:03:04 +00:00
|
|
|
description: List of modified files.
|
2021-06-18 14:19:28 +00:00
|
|
|
value: ${{ steps.changed-files.outputs.modified_files }}
|
2021-03-05 03:43:17 +00:00
|
|
|
renamed_files:
|
|
|
|
description: List of renamed files.
|
2021-06-18 14:19:28 +00:00
|
|
|
value: ${{ steps.changed-files.outputs.renamed_files }}
|
2021-06-18 23:28:02 +00:00
|
|
|
type_changed_files:
|
|
|
|
description: List of files that had type changes.
|
|
|
|
value: ${{ steps.changed-files.outputs.type_changed_files }}
|
2021-03-05 03:43:17 +00:00
|
|
|
unmerged_files:
|
|
|
|
description: List of unmerged files.
|
2021-06-18 14:19:28 +00:00
|
|
|
value: ${{ steps.changed-files.outputs.unmerged_files }}
|
2021-03-05 03:43:17 +00:00
|
|
|
unknown_files:
|
|
|
|
description: List of unknown files.
|
2021-06-18 14:19:28 +00:00
|
|
|
value: ${{ steps.changed-files.outputs.unknown_files }}
|
2021-09-04 13:42:11 +00:00
|
|
|
all_changed_and_modified_files:
|
2021-03-05 03:43:17 +00:00
|
|
|
description: List of all changed files.
|
2021-09-04 13:42:11 +00:00
|
|
|
value: ${{ steps.changed-files.outputs.all_changed_and_modified_files }}
|
2021-04-11 21:54:10 +00:00
|
|
|
all_modified_files:
|
2021-05-21 12:39:56 +00:00
|
|
|
description: List of all copied modified and added files.
|
2021-06-18 14:19:28 +00:00
|
|
|
value: ${{ steps.changed-files.outputs.all_modified_files }}
|
2021-05-01 17:32:09 +00:00
|
|
|
any_changed:
|
|
|
|
description: Return true only when any files provided using the files input have changed.
|
2021-06-18 14:19:28 +00:00
|
|
|
value: ${{ steps.changed-files.outputs.any_changed }}
|
2021-07-17 19:13:26 +00:00
|
|
|
only_changed:
|
|
|
|
description: Return true only when only files provided using the files input have changed.
|
|
|
|
value: ${{ steps.changed-files.outputs.only_changed }}
|
|
|
|
other_changed_files:
|
|
|
|
description: Return list of changed files not listed in the files input.
|
|
|
|
value: ${{ steps.changed-files.outputs.other_changed_files }}
|
2021-03-05 02:36:52 +00:00
|
|
|
|
|
|
|
runs:
|
2021-06-18 14:19:28 +00:00
|
|
|
using: 'composite'
|
|
|
|
steps:
|
2021-07-17 14:51:08 +00:00
|
|
|
- run: |
|
2021-09-04 13:08:20 +00:00
|
|
|
bash $GITHUB_ACTION_PATH/sourcefiles.sh
|
2021-07-17 14:51:08 +00:00
|
|
|
id: source-input-files
|
|
|
|
shell: bash
|
|
|
|
env:
|
|
|
|
INPUT_FILES: ${{ inputs.files }}
|
2021-07-17 15:46:59 +00:00
|
|
|
INPUT_FILES_FROM_SOURCE_FILE: ${{ inputs.files_from_source_file }}
|
2021-06-18 14:19:28 +00:00
|
|
|
- run: |
|
|
|
|
bash $GITHUB_ACTION_PATH/entrypoint.sh
|
|
|
|
id: changed-files
|
|
|
|
shell: bash
|
|
|
|
env:
|
2021-06-18 23:03:51 +00:00
|
|
|
GITHUB_BASE_REF: ${{ github.base_ref }}
|
|
|
|
GITHUB_REPOSITORY: ${{ github.repository }}
|
2021-06-18 14:19:28 +00:00
|
|
|
# INPUT_<VARIABLE_NAME> is not available in Composite run steps
|
|
|
|
# https://github.community/t/input-variable-name-is-not-available-in-composite-run-steps/127611
|
2021-07-14 20:57:17 +00:00
|
|
|
INPUT_SHA: ${{ inputs.sha }}
|
2021-07-17 15:46:59 +00:00
|
|
|
INPUT_BASE_SHA: ${{ inputs.base_sha }}
|
2021-06-18 23:15:18 +00:00
|
|
|
INPUT_TOKEN: ${{ inputs.token }}
|
2021-09-04 13:08:20 +00:00
|
|
|
INPUT_FILES: ${{ steps.source-input-files.outputs.files }}
|
2021-06-18 14:19:28 +00:00
|
|
|
INPUT_SEPARATOR: ${{ inputs.separator }}
|
2021-08-28 01:53:03 +00:00
|
|
|
INPUT_PATH: ${{ inputs.path }}
|
2021-03-05 10:58:42 +00:00
|
|
|
|
2021-03-05 02:36:52 +00:00
|
|
|
branding:
|
2021-04-23 10:55:01 +00:00
|
|
|
icon: file-text
|
2021-03-05 02:36:52 +00:00
|
|
|
color: white
|