mirror of
https://github.com/pre-commit/action.git
synced 2025-11-12 21:13:45 +00:00
GitHub recently added support for requiring actions to be pinned to a full-length commit SHA[^1]. Their changelog doesn't mention that composite actions also fail if their own actions are not pinned, which is the case for this project. Hope this makes sense. I didn't bump the versions, just added the commit SHAs, using `pinact run`. [^1]: https://github.blog/changelog/2025-08-15-github-actions-policy-now-supports-blocking-and-sha-pinning-actions/
20 lines
624 B
YAML
20 lines
624 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@0400d5f644dc74513175e3cd8d07132dd4860809 # v4.2.4
|
|
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
|