diff --git a/entrypoint.sh b/entrypoint.sh index 655d2ab..6fb81fe 100755 --- a/entrypoint.sh +++ b/entrypoint.sh @@ -6,13 +6,15 @@ main() { BRANCH=${GITHUB_REF:11} echo "Current branch: ${BRANCH}" + if [ "$BRANCH" == "master" ]; then + echo "No check of master branch needed." + exit 0 + fi + # Using git directly because the $GITHUB_EVENT_PATH file only shows commits in # most recent push. /usr/bin/git -c protocol.version=2 fetch --no-tags --prune --progress --no-recurse-submodules --depth=1 origin master - if [ "$BRANCH" != "master" ]; then - /usr/bin/git -c protocol.version=2 fetch --no-tags --prune --progress --no-recurse-submodules --shallow-exclude=master origin ${BRANCH} - fi - + /usr/bin/git -c protocol.version=2 fetch --no-tags --prune --progress --no-recurse-submodules --shallow-exclude=master origin ${BRANCH} # Get the list before the "|| true" to fail the script when the git cmd fails. FIXUP_LIST=`/usr/bin/git log --pretty=format:%s origin/master..origin/${BRANCH}`