Update README
This commit is contained in:
parent
03de600c97
commit
16f4dc5956
20
README.md
20
README.md
@ -17,6 +17,9 @@ Add the following step at the end of your job.
|
||||
with:
|
||||
commit_message: Apply automatic changes
|
||||
branch: ${{ github.head_ref }}
|
||||
|
||||
# Optional glob pattern of files which should be added to the commit
|
||||
file_pattern: src/\*.js
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
```
|
||||
@ -27,18 +30,6 @@ The Action will only commit files back, if changes are available. The resulting
|
||||
|
||||
It is recommended to use this Action in Workflows which listen to the `pull_request` event. If you want to use the Action on other events, you have to hardcode the value for `branch` as `github.head_ref` is only available in Pull Requests.
|
||||
|
||||
|
||||
### Inputs
|
||||
|
||||
The following inputs are required
|
||||
|
||||
- `commit_message`: The commit message used when changes are available
|
||||
- `branch`: Branch name where changes should be pushed to
|
||||
|
||||
### Environment Variables
|
||||
|
||||
The `GITHUB_TOKEN` secret is required. It is automatically available in your repository. You have to add it to the configuration though.
|
||||
|
||||
## Example Usage
|
||||
|
||||
This Action will only work, if the job in your workflow changes project files.
|
||||
@ -72,11 +63,16 @@ jobs:
|
||||
with:
|
||||
commit_message: Apply php-cs-fixer changes
|
||||
branch: ${{ github.head_ref }}
|
||||
file_pattern: src/\*.php
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
```
|
||||
|
||||
### Inputs
|
||||
|
||||
Checkout [`actions.yml`](https://github.com/stefanzweifel/git-auto-commit-action/blob/master/actions.yml) for a full list of supported inputs.
|
||||
|
||||
## Versioning
|
||||
|
||||
We use [SemVer](http://semver.org/) for versioning. For the versions available, see the [tags on this repository](https://github.com/stefanzweifel/git-auto-commit-action/tags).
|
||||
|
Loading…
Reference in New Issue
Block a user