{"repo":"stefanzweifel/git-auto-commit-action","free":true,"listed":false,"github":"https://github.com/stefanzweifel/git-auto-commit-action","clone":"git clone https://github.com/stefanzweifel/git-auto-commit-action.git","description":"Automatically commit and push changed files back to GitHub with this GitHub Action for the 80% use case.","language":"Shell","stars":2562,"topics":["github-action","github-actions","git","github","workflow-runs","trigger"],"license":"MIT","category":"workflow-automation","readme_excerpt":"git-auto-commit Action The GitHub Action for committing files for the 80% use case. A GitHub Action to detect changed files during a Workflow run and to commit and push them back to the GitHub repository. By default, the commit is made in the name of \"GitHub Actions\" and co-authored by the user that made the last commit. If you want to learn more how this Action works under the hood, check out this article by Michael Heap. If your use case is not covered by git-auto-commit, you might want to check out the following alternative Actions: - planetscale/ghcommit-action - EndBug/add-and-commit Usage Adding git-auto-commit to your Workflow only takes a couple lines of code. 1. Set the contents -permission of the default GITHUB TOKEN to write . (Required to push new commits to the repository) 2. Add the following step at the end of your job, after other steps that might add or change files. Your Workflow should look similar to this example. [!NOTE] The Action has to be used in a Job that runs on a UNIX-like system (e.g. ubuntu-latest ). The following is an extended example with all available options. Please note that the Action depends on bash . If you're using the Action in a job in combination with a custom Docker container, make sure that bash is installed. Example Workflow In this example, we're running php-cs-fixer in a PHP project to fix the codestyle automatically, then commit possible changed files back to the repository. Note that we explicitly specify ${{ github.head ref }","default_branch":null,"files":null,"tree":[],"storefront":"/r/stefanzweifel","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/stefanzweifel/git-auto-commit-action/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}