5
0
Fork 0
mirror of https://github.com/pre-commit/action.git synced 2025-11-10 20:16:57 +00:00
pre-commit-action/action.yml
2025-03-06 18:48:31 +00:00

19 lines
563 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: echo "pythonLocation=$(which python)" >> "$GITHUB_ENV"
- uses: actions/cache@v4
with:
path: ~/.cache/pre-commit
key: pre-commit-3|${{ env.pythonLocation }}|${{ hashFiles('.pre-commit-config.yaml') }}
- run: |
which pre-commit
uv run pre-commit run --show-diff-on-failure --color=always ${{ inputs.extra_args }}
shell: bash