mirror of
https://github.com/pre-commit/action.git
synced 2025-11-07 10:46:56 +00:00
Merge pull request #38 from evanstoddard23/patch-1
update docs to use latest checkout action
This commit is contained in:
commit
b9651b1a18
1 changed files with 12 additions and 2 deletions
14
README.md
14
README.md
|
|
@ -53,8 +53,18 @@ this action also provides an additional behaviour when used in private
|
||||||
repositories. when configured with a github token, the action will push back
|
repositories. when configured with a github token, the action will push back
|
||||||
fixes to the pull request branch.
|
fixes to the pull request branch.
|
||||||
|
|
||||||
here's an example configuration for that (use the template above except for the
|
using the template above, you'll make two replacements for individual actions:
|
||||||
`pre-commit` action):
|
|
||||||
|
first is the checkout step, which needs to use unlimited fetch depth for
|
||||||
|
pushing
|
||||||
|
|
||||||
|
```yaml
|
||||||
|
- uses: actions/checkout@v2
|
||||||
|
with:
|
||||||
|
fetch-depth: 0
|
||||||
|
```
|
||||||
|
|
||||||
|
next is passing the token to the pre-commit action
|
||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
- uses: pre-commit/action@v2.0.0
|
- uses: pre-commit/action@v2.0.0
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue