11
0
Fork 0
mirror of https://github.com/pre-commit/action.git synced 2026-04-07 14:56:54 +00:00

Support extra_args keyword in pre-commit GitHub action

This commit is contained in:
Deepyaman Datta 2020-03-17 18:30:51 -05:00 committed by Anthony Sottile
parent 56842c8f20
commit 30b00a6cd9
3 changed files with 28 additions and 7 deletions

View file

@ -41,6 +41,20 @@ This does a few things:
Hopefully in the future when `actions` matures the yaml can be simplified.
### using this action with custom invocations
By default, this action runs all the hooks against all the files. `extra_args`
lets users specify a single hook id and/or options to pass to `pre-commit run`.
Here's a sample step configuration that only runs the `flake8` hook against all
the files (use the template above except for the `pre-commit` action):
```yaml
- uses: pre-commit/action@v1.0.1
with:
extra_args: flake8 --all-files
```
### using this action in private repositories
this action also provides an additional behaviour when used in private