coderrob/Git Commit and Push Changes
This action automates committing and pushing code changes to a GitHub repository. It ensures updates are regularly applied without manual intervention while following security best practices.
View on GitHubTrust Signals
- Scorecard Score
- not yet scored
- Maintenance Recency
- Stale
- License
- None
Inputs
| name | description | required | default |
|---|---|---|---|
| github-hostname | GitHub hostname to support GitHub Enterprise installations. | no | github.com |
| github-token | GitHub token used for authentication | yes | ${{ github.token }} |
| repository | GitHub repository in the format owner/repository | no | ${{ github.repository }} |
| remote-ref | Remote repository reference | no | origin |
| fetch-latest | Whether to fetch latest before committing changes | no | false |
| branch | Name of the branch to push the code into | no | ${{ github.ref_name }} |
| create-branch | Create branch if it does not exist | no | false |
| directory-path | Path to the directory containing files to commit and push | no | . |
| author-name | Name of the commit author | no | GitHub Actions |
| author-email | Email of the commit author | no | github-actions@noreply.github.com |
| sign-commit | Whether to sign commits using GPG (true/false) | no | false |
| commit-message | Commit message for the changes | no | Automated commit-and-push by GitHub Actions |
| force-push | Whether to force push (true/false) | no | false |
| open-pull-request | Whether to open pull request (true/false) | no | false |
| pull-request-title | Title of the pull request when open-pull-request is true | no | Automated Pull Request |
| pull-request-body | Body of the pull request when open-pull-request is true. If empty, defaults to 'Automated pull request created by {author-name}.' | no | "" |
Outputs
| name | description |
|---|---|
| commit-hash | The hash of the latest commit |
| pull-request-number | The number of the created pull request (only set when open-pull-request is true) |
| pull-request-url | The URL of the created pull request (only set when open-pull-request is true) |