Skip to content

Instantly share code, notes, and snippets.

@prassanna-ravishankar
Created September 16, 2020 08:44
Show Gist options
  • Save prassanna-ravishankar/d7d7fec88ad94747412e99ec55a0f270 to your computer and use it in GitHub Desktop.
Save prassanna-ravishankar/d7d7fec88ad94747412e99ec55a0f270 to your computer and use it in GitHub Desktop.
Github Pre-commit action
name: pre-commit
on:
pull_request:
push:
branches: [master]
jobs:
pre-commit:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- uses: actions/setup-python@v1
- id: file_changes
uses: trilom/file-changes-action@v1.2.4
with:
output: ' '
- uses: pre-commit/action@v2.0.0
with:
extra_args: --files ${{ steps.file_changes.outputs.files}}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment