mirror of
https://github.com/tj-actions/changed-files
synced 2024-12-17 13:47:20 +00:00
Update README.md
This commit is contained in:
parent
120ceacaf7
commit
ca2815e08c
1 changed files with 20 additions and 0 deletions
20
README.md
20
README.md
|
@ -71,6 +71,26 @@ jobs:
|
||||||
|
|
||||||
```
|
```
|
||||||
|
|
||||||
|
### Running [pre-commit](https://pre-commit.com/) on all modified files
|
||||||
|
|
||||||
|
```yaml
|
||||||
|
...
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v2
|
||||||
|
with:
|
||||||
|
fetch-depth: 0 # otherwise, you will fail to push refs to dest repo
|
||||||
|
|
||||||
|
- name: Get changed files
|
||||||
|
id: changed-files
|
||||||
|
uses: tj-actions/changed-files@v3.2
|
||||||
|
|
||||||
|
- name: Pre-commit
|
||||||
|
uses: pre-commit/action@v2.0.0
|
||||||
|
with:
|
||||||
|
extra_args: -v --hook-stage push --files ${{ steps.changed-files.outputs.all_modified_files }}
|
||||||
|
token: ${{ secrets.github_token }}
|
||||||
|
```
|
||||||
|
|
||||||
|
|
||||||
## Inputs
|
## Inputs
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue