mirror of
https://github.com/stefanzweifel/git-auto-commit-action.git
synced 2025-08-25 09:02:08 +08:00
Add tagging_message input option
This commit is contained in:
@@ -17,6 +17,8 @@ _main() {
|
||||
|
||||
_local_commit
|
||||
|
||||
_tag_commit
|
||||
|
||||
_push_to_github
|
||||
else
|
||||
|
||||
@@ -59,6 +61,15 @@ _local_commit() {
|
||||
git commit -m "$INPUT_COMMIT_MESSAGE" --author="$INPUT_COMMIT_AUTHOR" ${INPUT_COMMIT_OPTIONS:+"$INPUT_COMMIT_OPTIONS"}
|
||||
}
|
||||
|
||||
_tag_commit() {
|
||||
if [ -z "$INPUT_TAGGING_MESSAGE" ]
|
||||
then
|
||||
# No tag name given. Do nothing.
|
||||
else
|
||||
git tag -a "$INPUT_TAGGING_MESSAGE" -m "$INPUT_TAGGING_MESSAGE"
|
||||
fi
|
||||
}
|
||||
|
||||
_push_to_github() {
|
||||
if [ -z "$INPUT_BRANCH" ]
|
||||
then
|
||||
|
Reference in New Issue
Block a user