File tree Expand file tree Collapse file tree 3 files changed +20
-2
lines changed
Expand file tree Collapse file tree 3 files changed +20
-2
lines changed Original file line number Diff line number Diff line change @@ -41,6 +41,20 @@ This does a few things:
4141
4242Hopefully in the future when `actions` matures the yaml can be simplified.
4343
44+ # ## using this action with custom invocations
45+
46+ By default, this action runs all the hooks against all the files. `extra_args`
47+ lets users specify a single hook id and/or options to pass to `pre-commit run`.
48+
49+ Here's a sample step configuration that only runs the `flake8` hook against all
50+ the files (use the template above except for the `pre-commit` action) :
51+
52+ ` ` ` yaml
53+ - uses: pre-commit/[email protected] 54+ with:
55+ extra_args: flake8 --all-files
56+ ` ` `
57+
4458# ## using this action in private repositories
4559
4660this action also provides an additional behaviour when used in private
Original file line number Diff line number Diff line change 11name : pre-commit
22description : run pre-commit and optionally commit back to the pull request
33inputs :
4+ extra_args :
5+ description : options to pass to pre-commit run
6+ required : false
7+ default : ' --all-files'
48 token :
59 description : github token to clone / push with
610 required : false
You can’t perform that action at this time.
0 commit comments