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

Always save checked out hooks in GitHub Actions cache

As of actions/cache@v4 it's now possible to always save the cache, even if a previous step fails. This would be useful for avoiding recloning hooks when `pre-commit run` fails and the cache is empty.
This commit is contained in:
Carl Thomé 2024-02-20 00:56:11 +01:00 committed by GitHub
parent 2c7b3805fd
commit 0e2472f03e
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -16,5 +16,6 @@ runs:
with:
path: ~/.cache/pre-commit
key: pre-commit-3|${{ env.pythonLocation }}|${{ hashFiles('.pre-commit-config.yaml') }}
save-always: true
- run: pre-commit run --show-diff-on-failure --color=always ${{ inputs.extra_args }}
shell: bash