From 4db797a96155206d562625b4ad7a08dca23f1bf4 Mon Sep 17 00:00:00 2001 From: Lior Dux Date: Sun, 23 Mar 2025 22:01:31 +0200 Subject: [PATCH 1/6] Update entrypoint.sh --- entrypoint.sh | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/entrypoint.sh b/entrypoint.sh index bff98e0..03931e7 100755 --- a/entrypoint.sh +++ b/entrypoint.sh @@ -30,8 +30,12 @@ _main() { _check_if_git_is_available _switch_to_repository - - if _git_is_dirty || "$INPUT_SKIP_DIRTY_CHECK"; then + if _git_tag_only; then + _log "debug" "git tag only."; + _set_github_output "git_tag_only" "true" + _tag_commit + _push_to_github + elif _git_is_dirty || "$INPUT_SKIP_DIRTY_CHECK"; then _set_github_output "changes_detected" "true" From 2ac10431a86a5b997e9573eb6c9651f2382a437a Mon Sep 17 00:00:00 2001 From: Lior Dux Date: Sun, 23 Mar 2025 22:02:49 +0200 Subject: [PATCH 2/6] Update action.yml --- action.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/action.yml b/action.yml index fe8bfb3..2b8ea38 100644 --- a/action.yml +++ b/action.yml @@ -4,6 +4,10 @@ description: 'Automatically commits files which have been changed during the wor author: Stefan Zweifel inputs: + git_tag_only: + description: Perform a clean git tag and push, without commiting anything + required: false + default: false commit_message: description: Commit message required: false From 12e100dacb907a92e0dc82346eaf871f83e7847a Mon Sep 17 00:00:00 2001 From: Lior Dux Date: Sun, 23 Mar 2025 22:05:01 +0200 Subject: [PATCH 3/6] Update entrypoint.sh --- entrypoint.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/entrypoint.sh b/entrypoint.sh index 03931e7..ee26146 100755 --- a/entrypoint.sh +++ b/entrypoint.sh @@ -30,7 +30,7 @@ _main() { _check_if_git_is_available _switch_to_repository - if _git_tag_only; then + if "$INPUT_GIT_TAG_ONLY"; then _log "debug" "git tag only."; _set_github_output "git_tag_only" "true" _tag_commit From 19379b46c9475e7b57e9a487de999197e859098a Mon Sep 17 00:00:00 2001 From: Lior Dux Date: Sun, 23 Mar 2025 22:05:21 +0200 Subject: [PATCH 4/6] Update git-auto-commit.bats --- tests/git-auto-commit.bats | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/git-auto-commit.bats b/tests/git-auto-commit.bats index d08597c..43e2c14 100644 --- a/tests/git-auto-commit.bats +++ b/tests/git-auto-commit.bats @@ -21,6 +21,7 @@ setup() { export FAKE_DEFAULT_BRANCH=$(git config init.defaultBranch) # Set default INPUT variables used by the GitHub Action + export INPUT_GIT_TAG_ONLY=true export INPUT_REPOSITORY="${FAKE_LOCAL_REPOSITORY}" export INPUT_COMMIT_MESSAGE="Commit Message" export INPUT_BRANCH="${FAKE_DEFAULT_BRANCH}" From cfd6ac4a3bab2e8adaa26e0374379af334adfc43 Mon Sep 17 00:00:00 2001 From: Lior Dux Date: Sun, 23 Mar 2025 22:14:41 +0200 Subject: [PATCH 5/6] Update git-auto-commit.bats --- tests/git-auto-commit.bats | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/git-auto-commit.bats b/tests/git-auto-commit.bats index 43e2c14..26f6de3 100644 --- a/tests/git-auto-commit.bats +++ b/tests/git-auto-commit.bats @@ -21,7 +21,7 @@ setup() { export FAKE_DEFAULT_BRANCH=$(git config init.defaultBranch) # Set default INPUT variables used by the GitHub Action - export INPUT_GIT_TAG_ONLY=true + export INPUT_GIT_TAG_ONLY=false export INPUT_REPOSITORY="${FAKE_LOCAL_REPOSITORY}" export INPUT_COMMIT_MESSAGE="Commit Message" export INPUT_BRANCH="${FAKE_DEFAULT_BRANCH}" From 35d037abf5810698ff3d047321be58dda3323986 Mon Sep 17 00:00:00 2001 From: Lior Dux Date: Sun, 23 Mar 2025 22:33:45 +0200 Subject: [PATCH 6/6] Update README.md --- README.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/README.md b/README.md index f2c909e..5eef900 100644 --- a/README.md +++ b/README.md @@ -58,6 +58,10 @@ The following is an extended example with all available options. ```yaml - uses: stefanzweifel/git-auto-commit-action@v5 with: + # Perform a clean git tag and push, without commiting anything + # Default to false + git_tag_only: false + # Optional. Commit message for the created commit. # Defaults to "Apply automatic changes" commit_message: Automated Change