From 42e5be9ebbd72ff55894b76bd923bd7b0fe6ad51 Mon Sep 17 00:00:00 2001 From: Stefan Zweifel Date: Wed, 5 Feb 2020 21:39:14 +0100 Subject: [PATCH] WIP --- action.yml | 2 +- entrypoint.sh | 14 ++++++-------- 2 files changed, 7 insertions(+), 9 deletions(-) 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