Compare commits

...

11 Commits
v8 ... v8.2

Author SHA1 Message Date
Tonye Jack
1e10ed4950 Update arrow direction and added branch information (#113) 2021-06-24 16:46:31 -04:00
Tonye Jack
d8a3837b58 Delete codacy-analysis.yml 2021-06-24 12:55:41 -04:00
Tonye Jack
812f1ba385 Create codacy-analysis.yml 2021-06-24 12:38:48 -04:00
Tonye Jack
b8ad14b306 Updated README.md (#112)
Co-authored-by: jackton1 <jackton1@users.noreply.github.com>
2021-06-23 09:34:52 -04:00
Tonye Jack
b18824c9f0 Update README.md 2021-06-22 22:54:31 -04:00
Renovate Bot
1da043e160 Update tj-actions/verify-changed-files action to v7 2021-06-22 22:11:54 -04:00
Tonye Jack
f9f0a46798 Update action.yml 2021-06-21 18:36:10 -04:00
Tonye Jack
51a1c2074d Update README.md 2021-06-21 18:35:17 -04:00
Tonye Jack
3772657346 Update README.md 2021-06-21 18:34:15 -04:00
Tonye Jack
67831ca117 Upgraded to v8.1 (#110)
Co-authored-by: jackton1 <jackton1@users.noreply.github.com>
2021-06-18 19:33:45 -04:00
Tonye Jack
0754fdabe3 Rename changed_files to type_changed_files (#109) 2021-06-18 19:28:02 -04:00
5 changed files with 39 additions and 29 deletions

View File

@@ -17,7 +17,7 @@ jobs:
uses: tj-actions/remark@v1.5 uses: tj-actions/remark@v1.5
- name: Verify Changed files - name: Verify Changed files
uses: tj-actions/verify-changed-files@v6 uses: tj-actions/verify-changed-files@v7
id: verify_changed_files id: verify_changed_files
with: with:
files: | files: |

View File

@@ -1,12 +1,16 @@
# Changelog # Changelog
## [Unreleased](https://github.com/tj-actions/changed-files/tree/HEAD) ## [v8.1](https://github.com/tj-actions/changed-files/tree/v8.1) (2021-06-18)
[Full Changelog](https://github.com/tj-actions/changed-files/compare/v8...HEAD) [Full Changelog](https://github.com/tj-actions/changed-files/compare/v8...v8.1)
**Closed issues:**
- Rename changed\_files -\> type\_changed\_files [\#105](https://github.com/tj-actions/changed-files/issues/105)
**Merged pull requests:** **Merged pull requests:**
- Updated README.md [\#103](https://github.com/tj-actions/changed-files/pull/103) ([jackton1](https://github.com/jackton1)) - Rename changed\_files to type\_changed\_files [\#109](https://github.com/tj-actions/changed-files/pull/109) ([jackton1](https://github.com/jackton1))
## [v8](https://github.com/tj-actions/changed-files/tree/v8) (2021-06-18) ## [v8](https://github.com/tj-actions/changed-files/tree/v8) (2021-06-18)
@@ -20,6 +24,11 @@
**Merged pull requests:** **Merged pull requests:**
- Fixed missing env variables [\#108](https://github.com/tj-actions/changed-files/pull/108) ([jackton1](https://github.com/jackton1))
- Add macos to test. [\#107](https://github.com/tj-actions/changed-files/pull/107) ([jackton1](https://github.com/jackton1))
- Updated README.md [\#106](https://github.com/tj-actions/changed-files/pull/106) ([jackton1](https://github.com/jackton1))
- Upgraded to v8 [\#104](https://github.com/tj-actions/changed-files/pull/104) ([jackton1](https://github.com/jackton1))
- Updated README.md [\#103](https://github.com/tj-actions/changed-files/pull/103) ([jackton1](https://github.com/jackton1))
- Add support for multiple platforms [\#102](https://github.com/tj-actions/changed-files/pull/102) ([jackton1](https://github.com/jackton1)) - Add support for multiple platforms [\#102](https://github.com/tj-actions/changed-files/pull/102) ([jackton1](https://github.com/jackton1))
- Update alpine Docker tag to v3.14.0 [\#99](https://github.com/tj-actions/changed-files/pull/99) ([renovate[bot]](https://github.com/apps/renovate)) - Update alpine Docker tag to v3.14.0 [\#99](https://github.com/tj-actions/changed-files/pull/99) ([renovate[bot]](https://github.com/apps/renovate))
- Updated README.md [\#98](https://github.com/tj-actions/changed-files/pull/98) ([jackton1](https://github.com/jackton1)) - Updated README.md [\#98](https://github.com/tj-actions/changed-files/pull/98) ([jackton1](https://github.com/jackton1))
@@ -29,7 +38,7 @@
## [v7](https://github.com/tj-actions/changed-files/tree/v7) (2021-06-09) ## [v7](https://github.com/tj-actions/changed-files/tree/v7) (2021-06-09)
[Full Changelog](https://github.com/tj-actions/changed-files/compare/v6...v7) [Full Changelog](https://github.com/tj-actions/changed-files/compare/v6.3...v7)
**Closed issues:** **Closed issues:**
@@ -45,13 +54,13 @@
- Update tj-actions/sync-release-version action to v8.7 [\#86](https://github.com/tj-actions/changed-files/pull/86) ([renovate[bot]](https://github.com/apps/renovate)) - Update tj-actions/sync-release-version action to v8.7 [\#86](https://github.com/tj-actions/changed-files/pull/86) ([renovate[bot]](https://github.com/apps/renovate))
- Upgraded to v6.3 [\#85](https://github.com/tj-actions/changed-files/pull/85) ([jackton1](https://github.com/jackton1)) - Upgraded to v6.3 [\#85](https://github.com/tj-actions/changed-files/pull/85) ([jackton1](https://github.com/jackton1))
## [v6](https://github.com/tj-actions/changed-files/tree/v6) (2021-05-26)
[Full Changelog](https://github.com/tj-actions/changed-files/compare/v6.3...v6)
## [v6.3](https://github.com/tj-actions/changed-files/tree/v6.3) (2021-05-26) ## [v6.3](https://github.com/tj-actions/changed-files/tree/v6.3) (2021-05-26)
[Full Changelog](https://github.com/tj-actions/changed-files/compare/v6.2...v6.3) [Full Changelog](https://github.com/tj-actions/changed-files/compare/v6...v6.3)
## [v6](https://github.com/tj-actions/changed-files/tree/v6) (2021-05-26)
[Full Changelog](https://github.com/tj-actions/changed-files/compare/v6.2...v6)
**Merged pull requests:** **Merged pull requests:**

View File

@@ -8,10 +8,11 @@
## changed-files ## changed-files
Retrieve all changed files relative to the default branch (`pull_request*` events) or a previous commit (`push` event) returning the **absolute path** to all changed files from the project root. Retrieve all changed files relative to the default branch (`pull_request*` based events) or a previous commit (`push` based event) returning the **absolute path** to all changed files from the project root.
## Features ## Features
* Boolean output indicating that certain files have been modified.
* List all files that have changed. * List all files that have changed.
* Between the current pull request branch and the default branch. * Between the current pull request branch and the default branch.
* Between the last commit and the current pushed change. * Between the last commit and the current pushed change.
@@ -54,7 +55,7 @@ jobs:
- name: Get changed files - name: Get changed files
id: changed-files id: changed-files
uses: tj-actions/changed-files@v8 uses: tj-actions/changed-files@v8.1
- name: List all modified files - name: List all modified files
run: | run: |
@@ -86,7 +87,7 @@ jobs:
| deleted_files | `string` | `'new.txt path/to/file.png ...'` | Select only files that are Deleted (D) | | 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) | | 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) | | renamed_files | `string` | `'new.txt path/to/file.png ...'` | Select only files that are Renamed (R) |
| changed_files | `string` | `'new.txt path/to/file.png ...'` | Select only files that have their file type changed (T) | | 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) | | 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) | | unknown_files | `string` | `'new.txt path/to/file.png ...'` | Select only files that are Unknown (X) |
@@ -96,7 +97,7 @@ jobs:
|:-------------:|:-----------:|:-------------:|:-----------------------------:|:-------------:| |:-------------:|:-----------:|:-------------:|:-----------------------------:|:-------------:|
| token | `string` | `false` | `${{ github.token }}` | [GITHUB_TOKEN](https://docs.github.com/en/free-pro-team@latest/actions/reference/authentication-in-a-workflow#using-the-github_token-in-a-workflow) <br /> or a repo scoped <br /> [Personal Access Token](https://docs.github.com/en/free-pro-team@latest/github/authenticating-to-github/creating-a-personal-access-token) | | token | `string` | `false` | `${{ github.token }}` | [GITHUB_TOKEN](https://docs.github.com/en/free-pro-team@latest/actions/reference/authentication-in-a-workflow#using-the-github_token-in-a-workflow) <br /> or a repo scoped <br /> [Personal Access Token](https://docs.github.com/en/free-pro-team@latest/github/authenticating-to-github/creating-a-personal-access-token) |
| separator | `string` | `true` | `' '` | Output string separator | | separator | `string` | `true` | `' '` | Output string separator |
| files | `string` OR `string[]` | `false` | | Restricted list <br> or string of specific <br> files or filename <br> to watch for changes | | files | `string` OR `string[]` | `false` | | Check for changes <br> using only this list of files <br> (Defaults to the entire repo) |
## Example ## Example
@@ -107,11 +108,11 @@ jobs:
- name: Get changed files using defaults - name: Get changed files using defaults
id: changed-files id: changed-files
uses: tj-actions/changed-files@v8 uses: tj-actions/changed-files@v8.1
- name: Get changed files using a comma separator - name: Get changed files using a comma separator
id: changed-files-comma id: changed-files-comma
uses: tj-actions/changed-files@v8 uses: tj-actions/changed-files@v8.1
with: with:
separator: "," separator: ","
@@ -133,7 +134,7 @@ jobs:
- name: Get specific changed files - name: Get specific changed files
id: changed-files-specific id: changed-files-specific
uses: tj-actions/changed-files@v8 uses: tj-actions/changed-files@v8.1
with: with:
files: | files: |
my-file.txt my-file.txt
@@ -162,7 +163,7 @@ jobs:
- name: Get changed files - name: Get changed files
id: changed-files id: changed-files
uses: tj-actions/changed-files@v8 uses: tj-actions/changed-files@v8.1
- name: Pre-commit - name: Pre-commit
uses: pre-commit/action@v2.0.0 uses: pre-commit/action@v2.0.0

View File

@@ -11,7 +11,7 @@ inputs:
required: true required: true
default: " " default: " "
files: files:
description: 'Check for file changes for all files listed (Defaults to the entire repo)' description: 'Check for changes using only this list of files (Defaults to the entire repo)'
required: false required: false
default: "" default: ""
@@ -31,9 +31,9 @@ outputs:
renamed_files: renamed_files:
description: List of renamed files. description: List of renamed files.
value: ${{ steps.changed-files.outputs.renamed_files }} value: ${{ steps.changed-files.outputs.renamed_files }}
changed_files: type_changed_files:
description: List of changed files. description: List of files that had type changes.
value: ${{ steps.changed-files.outputs.changed_files }} value: ${{ steps.changed-files.outputs.type_changed_files }}
unmerged_files: unmerged_files:
description: List of unmerged files. description: List of unmerged files.
value: ${{ steps.changed-files.outputs.unmerged_files }} value: ${{ steps.changed-files.outputs.unmerged_files }}

View File

@@ -36,7 +36,7 @@ else
fi fi
fi fi
echo "Retrieving changes between $PREV_SHA $CURR_SHA" echo "Retrieving changes between $PREV_SHA ($TARGET_BRANCH) ← $CURR_SHA ($GITHUB_HEAD_REF)"
if [[ -z "$INPUT_FILES" ]]; then if [[ -z "$INPUT_FILES" ]]; then
echo "Getting diff..." echo "Getting diff..."
@@ -45,7 +45,7 @@ if [[ -z "$INPUT_FILES" ]]; then
DELETED=$(git diff --diff-filter=D --name-only "$PREV_SHA" "$CURR_SHA" | tr "\n" "$INPUT_SEPARATOR" | sed -E "s/($INPUT_SEPARATOR)$//") DELETED=$(git diff --diff-filter=D --name-only "$PREV_SHA" "$CURR_SHA" | tr "\n" "$INPUT_SEPARATOR" | sed -E "s/($INPUT_SEPARATOR)$//")
MODIFIED=$(git diff --diff-filter=M --name-only "$PREV_SHA" "$CURR_SHA" | tr "\n" "$INPUT_SEPARATOR" | sed -E "s/($INPUT_SEPARATOR)$//") MODIFIED=$(git diff --diff-filter=M --name-only "$PREV_SHA" "$CURR_SHA" | tr "\n" "$INPUT_SEPARATOR" | sed -E "s/($INPUT_SEPARATOR)$//")
RENAMED=$(git diff --diff-filter=R --name-only "$PREV_SHA" "$CURR_SHA" | tr "\n" "$INPUT_SEPARATOR" | sed -E "s/($INPUT_SEPARATOR)$//") RENAMED=$(git diff --diff-filter=R --name-only "$PREV_SHA" "$CURR_SHA" | tr "\n" "$INPUT_SEPARATOR" | sed -E "s/($INPUT_SEPARATOR)$//")
CHANGED=$(git diff --diff-filter=T --name-only "$PREV_SHA" "$CURR_SHA" | tr "\n" "$INPUT_SEPARATOR" | sed -E "s/($INPUT_SEPARATOR)$//") TYPE_CHANGED=$(git diff --diff-filter=T --name-only "$PREV_SHA" "$CURR_SHA" | tr "\n" "$INPUT_SEPARATOR" | sed -E "s/($INPUT_SEPARATOR)$//")
UNMERGED=$(git diff --diff-filter=U --name-only "$PREV_SHA" "$CURR_SHA" | tr "\n" "$INPUT_SEPARATOR" | sed -E "s/($INPUT_SEPARATOR)$//") UNMERGED=$(git diff --diff-filter=U --name-only "$PREV_SHA" "$CURR_SHA" | tr "\n" "$INPUT_SEPARATOR" | sed -E "s/($INPUT_SEPARATOR)$//")
UNKNOWN=$(git diff --diff-filter=X --name-only "$PREV_SHA" "$CURR_SHA" | tr "\n" "$INPUT_SEPARATOR" | sed -E "s/($INPUT_SEPARATOR)$//") UNKNOWN=$(git diff --diff-filter=X --name-only "$PREV_SHA" "$CURR_SHA" | tr "\n" "$INPUT_SEPARATOR" | sed -E "s/($INPUT_SEPARATOR)$//")
ALL_CHANGED=$(git diff --diff-filter="*ACDMRTUX" --name-only "$PREV_SHA" "$CURR_SHA" | tr "\n" "$INPUT_SEPARATOR" | sed -E "s/($INPUT_SEPARATOR)$//") ALL_CHANGED=$(git diff --diff-filter="*ACDMRTUX" --name-only "$PREV_SHA" "$CURR_SHA" | tr "\n" "$INPUT_SEPARATOR" | sed -E "s/($INPUT_SEPARATOR)$//")
@@ -56,7 +56,7 @@ else
DELETED_ARRAY=() DELETED_ARRAY=()
MODIFIED_ARRAY=() MODIFIED_ARRAY=()
RENAMED_ARRAY=() RENAMED_ARRAY=()
CHANGED_ARRAY=() TYPE_CHANGED_ARRAY=()
UNMERGED_ARRAY=() UNMERGED_ARRAY=()
UNKNOWN_ARRAY=() UNKNOWN_ARRAY=()
ALL_CHANGED_ARRAY=() ALL_CHANGED_ARRAY=()
@@ -76,7 +76,7 @@ else
# shellcheck disable=SC2207 # shellcheck disable=SC2207
RENAMED_ARRAY+=($(git diff --diff-filter=R --name-only "$PREV_SHA" "$CURR_SHA" | grep -E "(${path})" | xargs || true)) RENAMED_ARRAY+=($(git diff --diff-filter=R --name-only "$PREV_SHA" "$CURR_SHA" | grep -E "(${path})" | xargs || true))
# shellcheck disable=SC2207 # shellcheck disable=SC2207
CHANGED_ARRAY+=($(git diff --diff-filter=T --name-only "$PREV_SHA" "$CURR_SHA" | grep -E "(${path})" | xargs || true)) TYPE_CHANGED_ARRAY+=($(git diff --diff-filter=T --name-only "$PREV_SHA" "$CURR_SHA" | grep -E "(${path})" | xargs || true))
# shellcheck disable=SC2207 # shellcheck disable=SC2207
UNMERGED_ARRAY+=($(git diff --diff-filter=U --name-only "$PREV_SHA" "$CURR_SHA" | grep -E "(${path})" | xargs || true)) UNMERGED_ARRAY+=($(git diff --diff-filter=U --name-only "$PREV_SHA" "$CURR_SHA" | grep -E "(${path})" | xargs || true))
# shellcheck disable=SC2207 # shellcheck disable=SC2207
@@ -98,7 +98,7 @@ else
# shellcheck disable=SC2001 # shellcheck disable=SC2001
RENAMED=$(echo "${RENAMED_ARRAY[*]}" | sed 's/ */'"$INPUT_SEPARATOR"'/g') RENAMED=$(echo "${RENAMED_ARRAY[*]}" | sed 's/ */'"$INPUT_SEPARATOR"'/g')
# shellcheck disable=SC2001 # shellcheck disable=SC2001
CHANGED=$(echo "${CHANGED_ARRAY[*]}" | sed 's/ */'"$INPUT_SEPARATOR"'/g') TYPE_CHANGED=$(echo "${TYPE_CHANGED_ARRAY[*]}" | sed 's/ */'"$INPUT_SEPARATOR"'/g')
# shellcheck disable=SC2001 # shellcheck disable=SC2001
UNMERGED=$(echo "${UNMERGED_ARRAY[*]}" | sed 's/ */'"$INPUT_SEPARATOR"'/g') UNMERGED=$(echo "${UNMERGED_ARRAY[*]}" | sed 's/ */'"$INPUT_SEPARATOR"'/g')
# shellcheck disable=SC2001 # shellcheck disable=SC2001
@@ -114,7 +114,7 @@ echo "Copied files: $COPIED"
echo "Deleted files: $DELETED" echo "Deleted files: $DELETED"
echo "Modified files: $MODIFIED" echo "Modified files: $MODIFIED"
echo "Renamed files: $RENAMED" echo "Renamed files: $RENAMED"
echo "Changed files: $CHANGED" echo "Type Changed files: $TYPE_CHANGED"
echo "Unmerged files: $UNMERGED" echo "Unmerged files: $UNMERGED"
echo "Unknown files: $UNKNOWN" echo "Unknown files: $UNKNOWN"
echo "All changed files: $ALL_CHANGED" echo "All changed files: $ALL_CHANGED"
@@ -138,7 +138,7 @@ echo "::set-output name=copied_files::$COPIED"
echo "::set-output name=deleted_files::$DELETED" echo "::set-output name=deleted_files::$DELETED"
echo "::set-output name=modified_files::$MODIFIED" echo "::set-output name=modified_files::$MODIFIED"
echo "::set-output name=renamed_files::$RENAMED" echo "::set-output name=renamed_files::$RENAMED"
echo "::set-output name=changed_files::$CHANGED" echo "::set-output name=type_changed_files::$TYPE_CHANGED"
echo "::set-output name=unmerged_files::$UNMERGED" echo "::set-output name=unmerged_files::$UNMERGED"
echo "::set-output name=unknown_files::$UNKNOWN" echo "::set-output name=unknown_files::$UNKNOWN"
echo "::set-output name=all_changed_files::$ALL_CHANGED" echo "::set-output name=all_changed_files::$ALL_CHANGED"