From 8cc484cbc554155d09a09f493ad7f6c19ec8b248 Mon Sep 17 00:00:00 2001 From: Stefan Zweifel Date: Fri, 20 Sep 2019 10:30:36 +0200 Subject: [PATCH] Add ref argument --- actions.yml | 4 ++++ entrypoint.sh | 4 ++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/actions.yml b/actions.yml index 84af776..ca95851 100644 --- a/actions.yml +++ b/actions.yml @@ -14,6 +14,10 @@ inputs: description: 'Email address of the commit author' required: true + ref: + description: Branch to use + required: true + runs: using: 'docker' image: 'Dockerfile' diff --git a/entrypoint.sh b/entrypoint.sh index 323d820..e3813e0 100755 --- a/entrypoint.sh +++ b/entrypoint.sh @@ -30,13 +30,13 @@ then echo "Push Branch Value: $PUSH_BRANCH"; # Switch to branch from current Workflow run - git checkout -b $PUSH_BRANCH + git checkout -b $INPUT_REF git add . git commit -m "$INPUT_COMMIT_MESSAGE" --author="$INPUT_COMMIT_AUTHOR_NAME <$INPUT_COMMIT_AUTHOR_EMAIL>" - git push --set-upstream origin $PUSH_BRANCH + git push --set-upstream origin $INPUT_REF else echo "Working tree clean. Nothing to commit." fi