5
0
Fork 0
mirror of https://github.com/pre-commit/action.git synced 2025-11-11 04:26:56 +00:00
pre-commit-action/action.yml
2023-03-02 00:05:46 +02:00

20 lines
638 B
YAML

name: pre-commit
description: run pre-commit
inputs:
extra_args:
description: options to pass to pre-commit run
required: false
default: '--all-files'
runs:
using: composite
steps:
- run: python -m pip install pre-commit
shell: bash
- run: python -m pip freeze --local
shell: bash
- uses: actions/cache@69d9d449aced6a2ede0bc19182fadc3a0a42d2b0 # actions/cache@v3.2.6
with:
path: ~/.cache/pre-commit
key: pre-commit-3|${{ env.pythonLocation }}|${{ hashFiles('.pre-commit-config.yaml') }}
- run: pre-commit run --show-diff-on-failure --color=always ${{ inputs.extra_args }}
shell: bash