Skip to content

Commit

Permalink
Update action.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
jackton1 committed Mar 5, 2021
1 parent f27a974 commit fa35dfd
Showing 1 changed file with 9 additions and 19 deletions.
28 changes: 9 additions & 19 deletions action.yml
Expand Up @@ -58,27 +58,17 @@ runs:
echo "Getting head sha..."
HEAD_SHA=$(git rev-parse ${TARGET_BRANCH} || true)
read -a ADDED_FILES <<< "$(git diff --diff-filter=A --name-only ${HEAD_SHA} || true)"
read -a COPIED_FILES <<< "$(git diff --diff-filter=C --name-only ${HEAD_SHA} || true)"
read -a DELETED_FILES <<< "$(git diff --diff-filter=D --name-only ${HEAD_SHA} || true)"
read -a MODIFIED_FILES <<< "$(git diff --diff-filter=M --name-only ${HEAD_SHA} || true)"
read -a RENAMED_FILES <<< "$(git diff --diff-filter=R --name-only ${HEAD_SHA} || true)"
read -a CHANGED_FILES <<< "$(git diff --diff-filter=T --name-only ${HEAD_SHA} || true)"
read -a UNMERGED_FILES <<< "$(git diff --diff-filter=U --name-only ${HEAD_SHA} || true)"
read -a UNKNOWN_FILES <<< "$(git diff --diff-filter=X --name-only ${HEAD_SHA} || true)"
read -a ALL_CHANGED_FILES <<< "$(git diff --diff-filter='*' --name-only ${HEAD_SHA} || true)"
echo "Getting diff..."
echo "::set-output name=added_files::${{ toJSON($ADDED_FILES) }}"
echo "::set-output name=copied_files::${{ toJSON($COPIED_FILES) }}"
echo "::set-output name=deleted_files::${{ toJSON($DELETED_FILES) }}"
echo "::set-output name=modified_files::${{ toJSON($MODIFIED_FILES) }}"
echo "::set-output name=renamed_files::${{ toJSON($RENAMED_FILES) }}"
echo "::set-output name=changed_files::${{ toJSON($CHANGED_FILES) }}"
echo "::set-output name=unmerged_files::${{ toJSON($UNMERGED_FILES) }}"
echo "::set-output name=unknown_files::${{ toJSON($UNKNOWN_FILES) }}"
echo "::set-output name=all_changed_files::${{ toJSON($ALL_CHANGED_FILES) }}"
echo "::set-output name=added_files::${{ $(git diff --diff-filter=A --name-only ${HEAD_SHA} || true) }}"
echo "::set-output name=copied_files::${{ $(git diff --diff-filter=C --name-only ${HEAD_SHA} || true) }}"
echo "::set-output name=deleted_files::${{ $(git diff --diff-filter=D --name-only ${HEAD_SHA} || true) }}"
echo "::set-output name=modified_files::${{ $(git diff --diff-filter=M --name-only ${HEAD_SHA} || true) }}"
echo "::set-output name=renamed_files::${{ $(git diff --diff-filter=R --name-only ${HEAD_SHA} || true) }}"
echo "::set-output name=changed_files::${{ $(git diff --diff-filter=T --name-only ${HEAD_SHA} || true) }}"
echo "::set-output name=unmerged_files::${{ $(git diff --diff-filter=U --name-only ${HEAD_SHA} || true) }}"
echo "::set-output name=unknown_files::${{ $(git diff --diff-filter=X --name-only ${HEAD_SHA} || true) }}"
echo "::set-output name=all_changed_files::${{ $(git diff --diff-filter='*' --name-only ${HEAD_SHA} || true) }}"
shell: bash

branding:
Expand Down

0 comments on commit fa35dfd

Please sign in to comment.