mirror of
https://github.com/tj-actions/changed-files
synced 2024-12-17 13:47:20 +00:00
chore: improve debug message.
This commit is contained in:
parent
f038bbbed9
commit
69d9410ad3
2 changed files with 4 additions and 0 deletions
|
@ -57,6 +57,7 @@ else
|
|||
fi
|
||||
|
||||
if [[ -z $GITHUB_BASE_REF ]]; then
|
||||
echo "Running on a push event..."
|
||||
TARGET_BRANCH=${GITHUB_REF/refs\/heads\//} && exit_status=$? || exit_status=$?
|
||||
CURRENT_BRANCH=$TARGET_BRANCH && exit_status=$? || exit_status=$?
|
||||
|
||||
|
@ -64,6 +65,7 @@ if [[ -z $GITHUB_BASE_REF ]]; then
|
|||
PREVIOUS_SHA=$GITHUB_EVENT_BEFORE
|
||||
|
||||
if [[ -z "$PREVIOUS_SHA" || "$PREVIOUS_SHA" == "0000000000000000000000000000000000000000" ]]; then
|
||||
echo "::debug::First commit detected"
|
||||
PREVIOUS_SHA=$(git rev-parse "$(git branch -r --sort=-committerdate | head -1)")
|
||||
fi
|
||||
|
||||
|
@ -89,6 +91,7 @@ if [[ -z $GITHUB_BASE_REF ]]; then
|
|||
exit 1
|
||||
fi
|
||||
else
|
||||
echo "Running on a pull request event..."
|
||||
TARGET_BRANCH=$GITHUB_BASE_REF
|
||||
CURRENT_BRANCH=$GITHUB_HEAD_REF
|
||||
|
||||
|
|
|
@ -25,6 +25,7 @@ elif [[ "$INPUT_SINCE_LAST_REMOTE_COMMIT" == "true" ]]; then
|
|||
LAST_REMOTE_COMMIT="$GITHUB_EVENT_BEFORE"
|
||||
|
||||
if [[ -z "$LAST_REMOTE_COMMIT" || "$LAST_REMOTE_COMMIT" == "0000000000000000000000000000000000000000" ]]; then
|
||||
echo "::debug::First commit detected"
|
||||
LAST_REMOTE_COMMIT=$(git rev-parse "$(git branch -r --sort=-committerdate | head -1)")
|
||||
fi
|
||||
if [[ "$INPUT_SHA" == "$LAST_REMOTE_COMMIT" ]]; then
|
||||
|
|
Loading…
Reference in a new issue