Add ref argument

This commit is contained in:
Stefan Zweifel 2019-09-20 10:30:36 +02:00
parent ed0ebb9072
commit 8cc484cbc5
2 changed files with 6 additions and 2 deletions

View File

@ -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'

View File

@ -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