From 858bda29ab5325ebeae1161b80758a6acd208b45 Mon Sep 17 00:00:00 2001 From: Tonye Jack Date: Sat, 1 May 2021 08:52:22 -0400 Subject: [PATCH] Update action.yml --- action.yml | 35 +++++++++++++++++++++++------------ 1 file changed, 23 insertions(+), 12 deletions(-) diff --git a/action.yml b/action.yml index 669d6b78..4e39bee3 100644 --- a/action.yml +++ b/action.yml @@ -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