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)")
|
||||
fi
|
||||
|
||||
if [[ "$PREVIOUS_SHA" == "$CURRENT_SHA" ]]; then
|
||||
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
|
||||
TARGET_BRANCH=$(git name-rev --name-only "$PREVIOUS_SHA" 2>&1) && exit_status=$? || exit_status=$?
|
||||
|
Loading…
x
Reference in New Issue
Block a user