Skip to content

somaz94/go-git-commit-action

Use this GitHub action with your project
Add this Action to an existing workflow or create a new one
View on Marketplace

Repository files navigation

Go Git Commit Action

License Latest Tag Top Language GitHub Marketplace

A GitHub Action that automates git commit, push, tag, and pull request operations. Written in Go for better performance and reliability.


Features

  • Fast & Reliable - Written in Go
  • Commit & Push - Automated git operations
  • Tag Management - Create and delete tags
  • Pull Requests - Automated PR creation
  • Flexible Patterns - Multiple file pattern support
  • Secure - Built-in authentication handling

Documentation


Quick Start


Basic Commit

- uses: somaz94/go-git-commit-action@v1
  with:
    user_email: actions@github.com
    user_name: GitHub Actions
    commit_message: Auto commit
    branch: main
    github_token: ${{ secrets.GITHUB_TOKEN }}

Create Tag

- uses: somaz94/go-git-commit-action@v1
  with:
    user_email: actions@github.com
    user_name: GitHub Actions
    tag_name: v1.0.0
    tag_message: Release version 1.0.0
    github_token: ${{ secrets.PAT_TOKEN }}    

Create Pull Request

- uses: somaz94/go-git-commit-action@v1
  with:
    user_email: actions@github.com
    user_name: GitHub Actions
    create_pr: true
    pr_branch: feature/my-branch
    pr_base: main
    github_token: ${{ secrets.PAT_TOKEN }}

Inputs

Input Required Description Default
user_email Yes Git user email -
user_name Yes Git user name -
commit_message No Commit message Auto commit by Go Git Commit Action
branch No Branch to push to main
repository_path No Path to the repository .
file_pattern No File pattern to add .
tag_name No Tag name to create or delete -
tag_message No Tag message (for annotated tags) -
delete_tag No Whether to delete the tag false
tag_reference No Git reference for the tag -
create_pr No Whether to create a pull request false
auto_branch No Whether to create automatic branch false
pr_title No Pull request title Auto PR by Go Git Commit Action
pr_base No Base branch for pull request main
pr_branch No Branch to create pull request from -
delete_source_branch No Whether to delete source branch after PR false
github_token No GitHub token for PR creation -
pr_labels No Labels to add to pull request (comma-separated) -
pr_body No Custom body message for pull request -
skip_if_empty No Skip the action if there are no changes false
pr_closed No Whether to close the pull request after creation false
pr_draft No Create pull request as draft false
pr_reviewers No Reviewers for PR (comma-separated usernames) -
pr_assignees No Assignees for PR (comma-separated usernames) -
pr_dry_run No Simulate PR creation without actually creating one false
debug No Enable debug logging false
timeout No Operation timeout in seconds 30
retry_count No Number of retries for failed operations 3

See Configuration for detailed descriptions and validation rules.


Authentication


For checkout@v6 users

- uses: actions/checkout@v6

- uses: somaz94/go-git-commit-action@v1
  with:
    user_email: actions@github.com
    user_name: GitHub Actions
    github_token: ${{ secrets.PAT_TOKEN }}  # Required!

See Authentication Guide for detailed setup.


Common Use Cases

  • Auto-commit generated files
  • Create release tags
  • Automated documentation updates
  • Sync configuration files
  • Create pull requests from workflows

See Examples for more use cases.


Development


Running Tests

go test ./...              # Run all tests
go test ./... -cover       # With coverage

See Development Guide for contributing.


License

This project is licensed under the MIT License - see the LICENSE file for details.


Contributing

Contributions welcome! See Development Guide for details.

Packages

 
 
 

Contributors

Languages