Complete reference for all available configuration options.
| Input | Description | Example |
|---|---|---|
user_email |
Git user email | actions@github.com |
user_name |
Git user name | GitHub Actions |
| Input | Description | Default |
|---|---|---|
commit_message |
Commit message | Auto commit by Go Git Commit Action |
branch |
Branch to push to | main |
repository_path |
Path to the repository | . |
file_pattern |
File pattern to add | . |
skip_if_empty |
Skip if no changes | false |
rebase_on_reject |
Rebase onto the remote branch and retry when a push finds the remote ahead | false |
Notes:
file_patternsupports multiple space-separated patterns:"*.md *.txt"repository_pathis relative to the workspace root- The action fails, rather than commit and push nothing, when changes are staged while
branchnames a local branch other than the one checked out, or while HEAD is detached. With nothing staged it carries on. A tag-only step commits nothing, so this check does not apply to it rebase_on_rejectis for a job that can run while someone else pushes to the same branch. It acts only after a rejected push, and only when the remote has moved forward from the commit's parent, so a push that succeeds never rebases and an authentication failure is left alone. It applies to thebranchinput, not to the branchauto_branchcreates, and needsretry_countof at least 2- With
rebase_on_reject, the action fails as it does without the input, and never force-pushes, when: the rebase conflicts; a tracked file outsidefile_patternhas uncommitted changes (there is no autostash, because a stash that cannot be reapplied leaves conflict markers while git reports success); the remote's history was rewritten, so the commit's parent is gone from it; or the job holds other unpushed commits - The published commit sits on a remote state the workflow did not test, so leave
rebase_on_rejectoff if later steps depend on the exact tree. If the remote already has the identical change, the rebase drops the commit, andcommit_shareports the remote's commit
| Input | Description | Default |
|---|---|---|
tag_name |
Tag name to create or delete | - |
tag_message |
Tag message (for annotated tags) | - |
delete_tag |
Whether to delete the tag | false |
tag_reference |
Git reference for the tag | - |
Notes:
- Tag operations only execute when
tag_nameis provided - A tag step that sets none of
file_pattern,commit_message,create_pr,skip_if_emptyorrebase_on_rejectcommits nothing. Settingfile_patternorcommit_messageto its default value counts as not setting it.skippedstaysfalse,changed_filesis0andcommit_shais HEAD - Unless
tag_referenceis set, the tag lands on HEAD. Abranchthat exists only on the remote is checked out first, so its tip is tagged; a localbranchis not switched to, and the action warns when HEAD is off it or holds unpushed commits. Abranchthat exists nowhere is created and pushed, so setbranchon a repository whose default is notmain delete_tagwith atag_namecommits and pushes nothing:file_pattern,commit_messageandcreate_prare ignored with a warning,skippedistrue,changed_filesis0andcommit_shais emptytag_referencecan be a commit SHA, tag name, or branch nametag_referencecannot be used withdelete_tag
| Input | Description | Default |
|---|---|---|
create_pr |
Whether to create a pull request | false |
auto_branch |
Whether to create automatic branch | false |
pr_title |
Pull request title | Auto PR by Go Git Commit Action |
pr_base |
Base branch for pull request | main |
pr_branch |
Branch to create pull request from | - |
delete_source_branch |
Delete source branch after PR | false |
github_token |
GitHub token for PR creation | - |
pr_labels |
Labels (comma-separated) | - |
pr_body |
Custom body message | - |
pr_closed |
Close PR after creation | false |
pr_dry_run |
Simulate PR creation | false |
Notes:
github_tokenis required whencreate_pris truepr_branchis required whencreate_pris true andauto_branchis falsepr_baseis required whencreate_pris true- When
auto_branchis true, creates branch with format:update-files-{timestamp} - When
pr_dry_runandauto_branchare both true, only the branch name is generated: no branch is created, nothing is committed or pushed, the changed-file preview lists the uncommitted changes thatfile_patternwould stage, and no pull request is opened delete_source_branchonly works withauto_branch: true
commit_message: "Auto commit by Go Git Commit Action"
branch: "main"
repository_path: "."
file_pattern: "."
skip_if_empty: false
rebase_on_reject: false
delete_tag: false
create_pr: false
auto_branch: false
pr_base: "main"
delete_source_branch: false
pr_closed: false
pr_dry_run: falseThe action validates inputs before execution:
pr_branchmust be set whenauto_branchis falsepr_basemust be set whencreate_pris truegithub_tokenmust be set whencreate_pris true
tag_referencecannot be used withdelete_tag
- Multiple patterns separated by spaces
- Standard git pattern matching supported