@@ -7,11 +7,11 @@ if [ "$INPUT_COMMIT" == 'false' ]; then INPUT_COMMIT='--files-only'; else INPUT_
77if [ " $INPUT_COMMITIZEN_VERSION " == ' latest' ]; then INPUT_COMMITIZEN_VERSION=" commitizen" ; else INPUT_COMMITIZEN_VERSION=" commitizen==$INPUT_COMMITIZEN_VERSION " ; fi
88if [ -n " $INPUT_NO_RAISE " ]; then INPUT_NO_RAISE=" --no-raise $INPUT_NO_RAISE " ; else INPUT_NO_RAISE=' ' ; fi
99
10- CURRENT_BRANCH=$( git rev-parse --abbrev-ref HEAD )
10+ CURRENT_BRANCH=" $( git branch --show-current ) "
1111INPUT_BRANCH=${INPUT_BRANCH:- $CURRENT_BRANCH }
1212INPUT_EXTRA_REQUIREMENTS=${INPUT_EXTRA_REQUIREMENTS:- ' ' }
1313REPOSITORY=${INPUT_REPOSITORY:- $GITHUB_REPOSITORY }
14- # : "${INPUT_CHANGELOG:=true}" ignroed for now, let's check that it works
14+ # : "${INPUT_CHANGELOG:=true}" ignored for now, let's check that it works
1515
1616set -e
1717
@@ -28,9 +28,10 @@ pip install "$INPUT_COMMITIZEN_VERSION" $INPUT_EXTRA_REQUIREMENTS
2828echo " Commitizen version:"
2929cz version
3030
31- echo " Configuring git user and email ..."
31+ echo " Configuring Git username, email, and pull behavior ..."
3232git config --local user.name " $INPUT_GIT_NAME "
3333git config --local user.email " $INPUT_GIT_EMAIL "
34+ git config --local pull.rebase true
3435echo " Git name: $( git config --get user.name) "
3536echo " Git email: $( git config --get user.email) "
3637
@@ -53,7 +54,7 @@ if [ "$INPUT_PUSH" == "true" ]; then
5354 echo " Pushing to branch..."
5455 remote_repo=" https://${GITHUB_ACTOR} :${INPUT_GITHUB_TOKEN} @github.com/${REPOSITORY} .git"
5556 git pull ${remote_repo} ${INPUT_BRANCH}
56- git push " ${remote_repo} " HEAD:${INPUT_BRANCH} --follow-tags -- tags
57+ git push " ${remote_repo} " HEAD:${INPUT_BRANCH} --tags
5758else
5859 echo " Not pushing"
5960fi
0 commit comments