mirror of
https://github.com/stefanzweifel/git-auto-commit-action.git
synced 2025-07-21 23:56:09 +08:00
Add ref argument
This commit is contained in:
@@ -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
|
||||
|
Reference in New Issue
Block a user