@@ -7,11 +7,11 @@ if [ "$INPUT_COMMIT" == 'false' ]; then INPUT_COMMIT='--files-only'; else INPUT_
7
7
if [ " $INPUT_COMMITIZEN_VERSION " == ' latest' ]; then INPUT_COMMITIZEN_VERSION=" commitizen" ; else INPUT_COMMITIZEN_VERSION=" commitizen==$INPUT_COMMITIZEN_VERSION " ; fi
8
8
if [ -n " $INPUT_NO_RAISE " ]; then INPUT_NO_RAISE=" --no-raise $INPUT_NO_RAISE " ; else INPUT_NO_RAISE=' ' ; fi
9
9
10
- CURRENT_BRANCH=$( git rev-parse --abbrev-ref HEAD )
10
+ CURRENT_BRANCH=" $( git branch --show-current ) "
11
11
INPUT_BRANCH=${INPUT_BRANCH:- $CURRENT_BRANCH }
12
12
INPUT_EXTRA_REQUIREMENTS=${INPUT_EXTRA_REQUIREMENTS:- ' ' }
13
13
REPOSITORY=${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
15
15
16
16
set -e
17
17
@@ -28,9 +28,10 @@ pip install "$INPUT_COMMITIZEN_VERSION" $INPUT_EXTRA_REQUIREMENTS
28
28
echo " Commitizen version:"
29
29
cz version
30
30
31
- echo " Configuring git user and email ..."
31
+ echo " Configuring Git username, email, and pull behavior ..."
32
32
git config --local user.name " $INPUT_GIT_NAME "
33
33
git config --local user.email " $INPUT_GIT_EMAIL "
34
+ git config --local pull.rebase true
34
35
echo " Git name: $( git config --get user.name) "
35
36
echo " Git email: $( git config --get user.email) "
36
37
@@ -53,7 +54,7 @@ if [ "$INPUT_PUSH" == "true" ]; then
53
54
echo " Pushing to branch..."
54
55
remote_repo=" https://${GITHUB_ACTOR} :${INPUT_GITHUB_TOKEN} @github.com/${REPOSITORY} .git"
55
56
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
57
58
else
58
59
echo " Not pushing"
59
60
fi
0 commit comments