mirror of
https://github.com/stefanzweifel/git-auto-commit-action.git
synced 2024-11-06 02:08:05 +00:00
Add ref argument
This commit is contained in:
parent
ed0ebb9072
commit
8cc484cbc5
@ -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'
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user