File tree 4 files changed +15
-2
lines changed 4 files changed +15
-2
lines changed Original file line number Diff line number Diff line change @@ -58,6 +58,10 @@ The following is an extended example with all available options.
58
58
` ` ` yaml
59
59
- uses: stefanzweifel/git-auto-commit-action@v5
60
60
with:
61
+ # Perform a clean git tag and push, without commiting anything
62
+ # Default to false
63
+ git_tag_only: false
64
+
61
65
# Optional. Commit message for the created commit.
62
66
# Defaults to "Apply automatic changes"
63
67
commit_message: Automated Change
Original file line number Diff line number Diff line change @@ -4,6 +4,10 @@ description: 'Automatically commits files which have been changed during the wor
4
4
author :
Stefan Zweifel <[email protected] >
5
5
6
6
inputs :
7
+ git_tag_only :
8
+ description : Perform a clean git tag and push, without commiting anything
9
+ required : false
10
+ default : false
7
11
commit_message :
8
12
description : Commit message
9
13
required : false
Original file line number Diff line number Diff line change @@ -30,8 +30,12 @@ _main() {
30
30
_check_if_git_is_available
31
31
32
32
_switch_to_repository
33
-
34
- if _git_is_dirty || " $INPUT_SKIP_DIRTY_CHECK " ; then
33
+ if " $INPUT_GIT_TAG_ONLY " ; then
34
+ _log " debug" " git tag only." ;
35
+ _set_github_output " git_tag_only" " true"
36
+ _tag_commit
37
+ _push_to_github
38
+ elif _git_is_dirty || " $INPUT_SKIP_DIRTY_CHECK " ; then
35
39
36
40
_set_github_output " changes_detected" " true"
37
41
Original file line number Diff line number Diff line change @@ -21,6 +21,7 @@ setup() {
21
21
export FAKE_DEFAULT_BRANCH=$( git config init.defaultBranch)
22
22
23
23
# Set default INPUT variables used by the GitHub Action
24
+ export INPUT_GIT_TAG_ONLY=false
24
25
export INPUT_REPOSITORY=" ${FAKE_LOCAL_REPOSITORY} "
25
26
export INPUT_COMMIT_MESSAGE=" Commit Message"
26
27
export INPUT_BRANCH=" ${FAKE_DEFAULT_BRANCH} "
You can’t perform that action at this time.
0 commit comments