3
0
Fork 0
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:
Tonye Jack 2021-04-11 18:27:34 -04:00 committed by GitHub
parent 120ceacaf7
commit ca2815e08c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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