Updated determining the remote sha
This commit is contained in:
parent
3d7cff9835
commit
bc7fa5e550
@ -69,10 +69,14 @@ if [[ -z $GITHUB_BASE_REF ]]; then
|
|||||||
PREVIOUS_SHA=$(git rev-parse "$(git branch -r --sort=-committerdate | head -1 | xargs)")
|
PREVIOUS_SHA=$(git rev-parse "$(git branch -r --sort=-committerdate | head -1 | xargs)")
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
if [[ "$PREVIOUS_SHA" == "$CURRENT_SHA" ]]; then
|
||||||
|
PREVIOUS_SHA=$(git rev-parse "$CURRENT_SHA^1")
|
||||||
|
|
||||||
if [[ "$PREVIOUS_SHA" == "$CURRENT_SHA" ]]; then
|
if [[ "$PREVIOUS_SHA" == "$CURRENT_SHA" ]]; then
|
||||||
INITIAL_COMMIT="true"
|
INITIAL_COMMIT="true"
|
||||||
echo "::debug::Initial commit detected"
|
echo "::debug::Initial commit detected"
|
||||||
fi
|
fi
|
||||||
|
fi
|
||||||
else
|
else
|
||||||
PREVIOUS_SHA=$INPUT_BASE_SHA
|
PREVIOUS_SHA=$INPUT_BASE_SHA
|
||||||
TARGET_BRANCH=$(git name-rev --name-only "$PREVIOUS_SHA" 2>&1) && exit_status=$? || exit_status=$?
|
TARGET_BRANCH=$(git name-rev --name-only "$PREVIOUS_SHA" 2>&1) && exit_status=$? || exit_status=$?
|
||||||
|
Loading…
x
Reference in New Issue
Block a user