diff --git a/action.yml b/action.yml index 5102e64..d239de0 100644 --- a/action.yml +++ b/action.yml @@ -10,7 +10,7 @@ inputs: branch: description: Git branch name, where changes should be pushed too. required: false - default: null + default: '' commit_options: description: Commit options (eg. --no-verify) required: false diff --git a/entrypoint.sh b/entrypoint.sh index 930a6da..00674fb 100755 --- a/entrypoint.sh +++ b/entrypoint.sh @@ -55,14 +55,12 @@ _local_commit() { } _push_to_github() { - git push origin - - # if [ -z "$INPUT_BRANCH" ] - # then - # git push --set-upstream origin "HEAD:$INPUT_BRANCH" - # else - # git push origin - # fi + if [ -n "$INPUT_BRANCH" ] + then + git push origin + else + git push --set-upstream origin "HEAD:$INPUT_BRANCH" + fi } _main