Update get-base-sha.sh

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
This commit is contained in:
Tonye Jack 2022-10-01 11:44:20 -06:00 committed by GitHub
parent 29b8f500c2
commit 3751de29e9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -32,7 +32,7 @@ elif [[ "$INPUT_SINCE_LAST_REMOTE_COMMIT" == "true" ]]; then
LAST_REMOTE_COMMIT=$(git rev-parse "$(git branch -r --sort=-committerdate | head -1 | xargs)") LAST_REMOTE_COMMIT=$(git rev-parse "$(git branch -r --sort=-committerdate | head -1 | xargs)")
fi fi
if [[ "$INPUT_SHA" == "$LAST_REMOTE_COMMIT" ]]; then if [[ "$INPUT_SHA" == "$LAST_REMOTE_COMMIT" ]]; then
LAST_REMOTE_COMMIT=$(git rev-parse $INPUT_SHA^1) LAST_REMOTE_COMMIT=$(git rev-parse "$INPUT_SHA"^1)
fi fi
echo "::set-output name=base_sha::$LAST_REMOTE_COMMIT" echo "::set-output name=base_sha::$LAST_REMOTE_COMMIT"
fi fi