5
0
Fork 0
mirror of https://github.com/pre-commit/action.git synced 2025-11-07 10:46:56 +00:00

fix: support uv run as well

This commit is contained in:
Matthias Schoettle 2025-03-06 18:48:31 +00:00
parent 93b6e00b4d
commit c67d81d53a

View file

@ -8,9 +8,12 @@ inputs:
runs: runs:
using: composite using: composite
steps: steps:
- run: echo "pythonLocation=$(which python)" >> "$GITHUB_ENV"
- uses: actions/cache@v4 - uses: actions/cache@v4
with: with:
path: ~/.cache/pre-commit path: ~/.cache/pre-commit
key: pre-commit-3|${{ env.pythonLocation }}|${{ hashFiles('.pre-commit-config.yaml') }} key: pre-commit-3|${{ env.pythonLocation }}|${{ hashFiles('.pre-commit-config.yaml') }}
- run: uvx pre-commit run --show-diff-on-failure --color=always ${{ inputs.extra_args }} - run: |
which pre-commit
uv run pre-commit run --show-diff-on-failure --color=always ${{ inputs.extra_args }}
shell: bash shell: bash