mirror of
https://github.com/tj-actions/changed-files
synced 2024-12-17 03:47:20 +00:00
Fix persisting origin URL (#159)
This commit is contained in:
parent
2f8c46f9d7
commit
b80d9cca04
1 changed files with 4 additions and 2 deletions
|
@ -4,7 +4,7 @@ set -e
|
|||
|
||||
echo "::group::changed-files"
|
||||
|
||||
git remote set-url origin "https://${INPUT_TOKEN}@github.com/${GITHUB_REPOSITORY}"
|
||||
git remote add temp_changed_files "https://${INPUT_TOKEN}@github.com/${GITHUB_REPOSITORY}"
|
||||
|
||||
echo "Getting HEAD info..."
|
||||
|
||||
|
@ -36,7 +36,7 @@ if [[ -z $GITHUB_BASE_REF ]]; then
|
|||
else
|
||||
TARGET_BRANCH=$GITHUB_BASE_REF
|
||||
CURRENT_BRANCH=$GITHUB_HEAD_REF
|
||||
git fetch origin "${TARGET_BRANCH}":"${TARGET_BRANCH}"
|
||||
git fetch temp_changed_files "${TARGET_BRANCH}":"${TARGET_BRANCH}"
|
||||
if [[ -z $INPUT_BASE_SHA ]]; then
|
||||
PREVIOUS_SHA=$(git rev-parse "${TARGET_BRANCH}" 2>&1) && exit_status=$? || exit_status=$?
|
||||
else
|
||||
|
@ -162,6 +162,8 @@ if [[ -n "$UNIQUE_FILES" ]]; then
|
|||
|
||||
fi
|
||||
|
||||
git remote remove temp_changed_files
|
||||
|
||||
echo "::set-output name=added_files::$ADDED"
|
||||
echo "::set-output name=copied_files::$COPIED"
|
||||
echo "::set-output name=deleted_files::$DELETED"
|
||||
|
|
Loading…
Reference in a new issue