Only add --tags option if tagging message is set
This commit is contained in:
parent
0453bb1c25
commit
e1770ec52b
@ -75,8 +75,15 @@ _tag_commit() {
|
|||||||
_push_to_github() {
|
_push_to_github() {
|
||||||
if [ -z "$INPUT_BRANCH" ]
|
if [ -z "$INPUT_BRANCH" ]
|
||||||
then
|
then
|
||||||
echo "git push origin without branch name"
|
|
||||||
git push origin
|
# Only add `--tags` option, if `$INPUT_TAGGING_MESSAGE` is set
|
||||||
|
if [ -n "$INPUT_TAGGING_MESSAGE" ]
|
||||||
|
then
|
||||||
|
git push origin --tags
|
||||||
|
else
|
||||||
|
git push origin
|
||||||
|
fi
|
||||||
|
|
||||||
else
|
else
|
||||||
git push --set-upstream origin "HEAD:$INPUT_BRANCH" --tags
|
git push --set-upstream origin "HEAD:$INPUT_BRANCH" --tags
|
||||||
fi
|
fi
|
||||||
|
Loading…
Reference in New Issue
Block a user