Update action.yml

This commit is contained in:
Tonye Jack 2021-05-01 08:52:22 -04:00 committed by GitHub
parent 570809f09a
commit 858bda29ab
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -101,7 +101,6 @@ runs:
for path in ${INPUT_FILES}
do
echo "Checking for file changes: \"${path}\"..."
ADDED+=$(git diff --diff-filter=A --name-only "$HEAD_SHA" | grep -E "(${path})" || true)
COPIED+=$(git diff --diff-filter=C --name-only "$HEAD_SHA" | grep -E "(${path})" || true)
DELETED+=$(git diff --diff-filter=D --name-only "$HEAD_SHA" | grep -E "(${path})" || true)
@ -112,19 +111,31 @@ runs:
UNKNOWN+=$(git diff --diff-filter=X --name-only "$HEAD_SHA" | grep -E "(${path})" || true)
ALL_CHANGED+=$(git diff --diff-filter='*ACDMRTUX' --name-only "$HEAD_SHA" | grep -E "(${path})" || true)
ALL_MODIFIED_FILES+=$(git diff --diff-filter='ACM' --name-only "$HEAD_SHA" | grep -E "(${path})" || true)
done
echo "::set-output name=added_files::$(IFS='${{ inputs.separator }}'; echo '${ADDED[*]}')"
echo "::set-output name=copied_files::$(IFS='${{ inputs.separator }}'; echo '${COPIED[*]}'"
echo "::set-output name=deleted_files::$(IFS='${{ inputs.separator }}'; echo '${DELETED[*]}'"
echo "::set-output name=modified_files::$(IFS='${{ inputs.separator }}'; echo '${MODIFIED[*]}'"
echo "::set-output name=renamed_files::$(IFS='${{ inputs.separator }}'; echo '${RENAMED[*]}'"
echo "::set-output name=changed_files::$(IFS='${{ inputs.separator }}'; echo '${CHANGED[*]}'"
echo "::set-output name=unmerged_files::$(IFS='${{ inputs.separator }}'; echo '${UNMERGED[*]}'"
echo "::set-output name=unknown_files::$(IFS='${{ inputs.separator }}'; echo '${UNKNOWN[*]}'"
echo "::set-output name=all_changed_files::$(IFS='${{ inputs.separator }}'; echo '${ALL_CHANGED[*]}'"
echo "::set-output name=all_modified_files::$(IFS='${{ inputs.separator }}'; echo '${ALL_MODIFIED_FILES[*]}'"
IFS="${{ inputs.separator }}"
ADDED=$(echo "${ADDED[*]}")
COPIED=$(echo "${COPIED[*]}")
DELETED=$(echo "${DELETED[*]}")
MODIFIED=$(echo "${MODIFIED[*]}")
RENAMED=$(echo "${RENAMED[*]}")
CHANGED=$(echo "${CHANGED[*]}")
UNMERGED=$(echo "${UNMERGED[*]}")
UNKNOWN=$(echo "${UNKNOWN[*]}")
ALL_CHANGED=$(echo "${ALL_CHANGED[*]}")
ALL_MODIFIED_FILES=$(echo "${ALL_MODIFIED_FILES[*]}")
echo "::set-output name=added_files::$ADDED"
echo "::set-output name=copied_files::$COPIED"
echo "::set-output name=deleted_files::$DELETED"
echo "::set-output name=modified_files::$MODIFIED"
echo "::set-output name=renamed_files::$RENAMED"
echo "::set-output name=changed_files::$CHANGED"
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"
fi
shell: bash