3
0
Fork 0
mirror of https://github.com/tj-actions/changed-files synced 2024-12-16 19:27:39 +00:00

Add support for all modified files

This commit is contained in:
Tonye Jack 2021-04-11 17:54:10 -04:00 committed by GitHub
parent d31b4186e9
commit 223d074d69
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -35,6 +35,9 @@ outputs:
all_changed_files:
description: List of all changed files.
value: ${{ steps.changed-files.outputs.all_changed_files }}
all_modified_files:
description: List of all changed modified and added files
value: ${{ steps.changed-files.outputs.all_modified_files }}
runs:
using: 'composite'
@ -64,6 +67,7 @@ runs:
UNMERGED=$(git diff --diff-filter=U --name-only "$HEAD_SHA" | tr "\n" "${{ inputs.separator }}" | sed -E 's/(${{ inputs.separator }})$//')
UNKNOWN=$(git diff --diff-filter=X --name-only "$HEAD_SHA" | tr "\n" "${{ inputs.separator }}" | sed -E 's/(${{ inputs.separator }})$//')
ALL_CHANGED=$(git diff --diff-filter='*ACDMRTUX' --name-only "$HEAD_SHA" | tr "\n" "${{ inputs.separator }}" | sed -E 's/(${{ inputs.separator }})$//')
ALL_MODIFIED_FILES=$(git diff --diff-filter='ACM' --name-only "$HEAD_SHA" | tr "\n" "${{ inputs.separator }}" | sed -E 's/(${{ inputs.separator }})$//')
echo "Getting diff..."
echo "::set-output name=added_files::$ADDED"
@ -75,6 +79,7 @@ runs:
echo "::set-output name=unmerged_files::$UNMERGED"
echo "::set-output name=unknown_files::$UNKNOWN"
echo "::set-output name=all_changed_files::$ALL_CHANGED"
echo "::set-output name=all_modified_files::$ALL_MODIFIED_FILES"
shell: bash
branding: