fix: bug using since_last_remote_commit with force push

This commit is contained in:
Tonye Jack 2022-12-16 12:51:54 -07:00 committed by GitHub
parent 483c5e735d
commit a377d0ea43
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -223,6 +223,10 @@ else
if [[ -z $INPUT_BASE_SHA ]]; then
if [[ "$INPUT_SINCE_LAST_REMOTE_COMMIT" == "true" ]]; then
PREVIOUS_SHA=$GITHUB_EVENT_BEFORE
if ! git rev-parse --quiet --verify "$PREVIOUS_SHA^{commit}" 1>/dev/null 2>&1; then
PREVIOUS_SHA=$(git rev-parse origin/"$CURRENT_BRANCH")
fi
else
PREVIOUS_SHA=${COMMON_ANCESTOR:-}