File tree Expand file tree Collapse file tree 4 files changed +15
-2
lines changed
Expand file tree Collapse file tree 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.
5858` ` ` yaml
5959- uses: stefanzweifel/git-auto-commit-action@v5
6060 with:
61+ # Perform a clean git tag and push, without commiting anything
62+ # Default to false
63+ git_tag_only: false
64+
6165 # Optional. Commit message for the created commit.
6266 # Defaults to "Apply automatic changes"
6367 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
44author : Stefan Zweifel <stefan@stefanzweifel.dev>
55
66inputs :
7+ git_tag_only :
8+ description : Perform a clean git tag and push, without commiting anything
9+ required : false
10+ default : false
711 commit_message :
812 description : Commit message
913 required : false
Original file line number Diff line number Diff line change @@ -30,8 +30,12 @@ _main() {
3030 _check_if_git_is_available
3131
3232 _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
3539
3640 _set_github_output " changes_detected" " true"
3741
Original file line number Diff line number Diff line change @@ -21,6 +21,7 @@ setup() {
2121 export FAKE_DEFAULT_BRANCH=$( git config init.defaultBranch)
2222
2323 # Set default INPUT variables used by the GitHub Action
24+ export INPUT_GIT_TAG_ONLY=false
2425 export INPUT_REPOSITORY=" ${FAKE_LOCAL_REPOSITORY} "
2526 export INPUT_COMMIT_MESSAGE=" Commit Message"
2627 export INPUT_BRANCH=" ${FAKE_DEFAULT_BRANCH} "
You can’t perform that action at this time.
0 commit comments