Merge pull request #728 from tj-actions/fix/bug-detecting-initial-commits
This commit is contained in:
commit
bcba9b1fee
@ -115,9 +115,7 @@ if [[ -z $GITHUB_BASE_REF ]]; then
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
if [[ "$PREVIOUS_SHA" == "$CURRENT_SHA" ]]; then
|
if [[ "$PREVIOUS_SHA" == "$CURRENT_SHA" ]]; then
|
||||||
PREVIOUS_SHA=$(git rev-parse "$CURRENT_SHA^1" 2>/dev/null || true)
|
if ! git rev-parse "$PREVIOUS_SHA^1" &>/dev/null; then
|
||||||
|
|
||||||
if [[ -z "$PREVIOUS_SHA" ]]; then
|
|
||||||
INITIAL_COMMIT="true"
|
INITIAL_COMMIT="true"
|
||||||
PREVIOUS_SHA=$(git rev-parse "$CURRENT_SHA")
|
PREVIOUS_SHA=$(git rev-parse "$CURRENT_SHA")
|
||||||
echo "::warning::Initial commit detected no previous commit found."
|
echo "::warning::Initial commit detected no previous commit found."
|
||||||
|
Loading…
x
Reference in New Issue
Block a user