From bc7fa5e550c761d48c1c0fbd2969ab547d77f855 Mon Sep 17 00:00:00 2001 From: Tonye Jack Date: Sat, 24 Sep 2022 20:52:05 -0600 Subject: [PATCH] Updated determining the remote sha --- diff-sha.sh | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/diff-sha.sh b/diff-sha.sh index 812c105b..c07ae21d 100644 --- a/diff-sha.sh +++ b/diff-sha.sh @@ -70,8 +70,12 @@ if [[ -z $GITHUB_BASE_REF ]]; then fi if [[ "$PREVIOUS_SHA" == "$CURRENT_SHA" ]]; then - INITIAL_COMMIT="true" - echo "::debug::Initial commit detected" + PREVIOUS_SHA=$(git rev-parse "$CURRENT_SHA^1") + + if [[ "$PREVIOUS_SHA" == "$CURRENT_SHA" ]]; then + INITIAL_COMMIT="true" + echo "::debug::Initial commit detected" + fi fi else PREVIOUS_SHA=$INPUT_BASE_SHA