https://github.com/coderrob/commit-and-push
GitHub Action to commit changes and push to a remote
https://github.com/coderrob/commit-and-push
Last synced: about 1 year ago
JSON representation
GitHub Action to commit changes and push to a remote
- Host: GitHub
- URL: https://github.com/coderrob/commit-and-push
- Owner: Coderrob
- License: apache-2.0
- Created: 2025-02-13T22:15:08.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2025-02-22T04:28:36.000Z (about 1 year ago)
- Last Synced: 2025-02-22T05:21:55.944Z (about 1 year ago)
- Language: TypeScript
- Size: 342 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Funding: .github/FUNDING.yml
- License: LICENSE
- Codeowners: CODEOWNERS
Awesome Lists containing this project
README
# 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.
## Branding
| Attribute | Value |
| --------- | ---------- |
| Color | blue |
| Icon | git-commit |
## Inputs
| Name | Description | Default | Required | Deprecation |
| ----------------- | ----------------------------------------------------------- | ----------------------------------- | -------- | ----------- |
| github-hostname | GitHub hostname to support GitHub Enterprise installations. | github.com | ❌ No | - |
| github-token | GitHub token used for authentication | ${{ github.token }} | ❌ No | - |
| repository | GitHub repository in the format owner/repository | ${{ github.repository }} | ❌ No | - |
| remote-ref | Remote repository reference | origin | ❌ No | - |
| fetch-latest | Whether to fetch latest before committing changes | false | ❌ No | - |
| branch | Name of the branch to push the code into | ${{ github.ref_name }} | ❌ No | - |
| create-branch | Create branch if it does not exist | false | ❌ No | - |
| directory-path | Path to the directory containing files to commit and push | . | ❌ No | - |
| author-name | Name of the commit author | GitHub Actions | ❌ No | - |
| author-email | Email of the commit author | | ❌ No | - |
| sign-commit | Whether to sign commits using GPG (true/false) | false | ❌ No | - |
| commit-message | Commit message for the changes | Automated commit by GitHub Actions | ❌ No | - |
| force-push | Whether to force push (true/false) | false | ❌ No | - |
| open-pull-request | Whether to open pull request (true/false) | false | ❌ No | - |
## Outputs
| Name | Description | Value |
| ----------- | ----------------------------- | ----- |
| commit-hash | The hash of the latest commit | |
## Environment Variables
This action does not require any environment variables.
## Dependencies
This section provides a graph of dependencies relevant to this action.
dependencies:
- GitHub Actions Runner
- Specific environment variables
- Required files and configurations
## Runs
**Execution Type:** node20
This action uses a Node.js runtime configuration.
## Example Usage
jobs:
example:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Run Commit and Push Changes
uses: ./
with:
github-hostname:
github-token:
repository:
remote-ref:
fetch-latest:
branch:
create-branch:
directory-path:
author-name:
author-email:
sign-commit:
commit-message:
force-push:
open-pull-request:
## Acknowledgments
This project leverages Markdown generation techniques from
[coderrob.com](https://coderrob.com), developed by **Robert Lindley**.