pre-commit#
Lint code.
Guidance
Developers MUST run this action in a dedicated, unprivileged workflow job to limit the risk of a supply chain attack.
Check code syntax/style using the configured pre-commit hooks. This action installs several common linter dependencies, including OpenTofu, pinact, and Trivy.
To update the pinned version of pre-commit, remove
pre-commit/requirements.txt and
regenerate it with the command pip-compile --generate-hashes --allow-unsafe --uploaded-prior-to=P7D, run from the
pre-commit/ directory. Update the other
non-action version pins in
pre-commit/action.yaml.
Inputs#
- python-version:
(required, default value:
"3.13")Specify the version of Python with which to run pre-commit.
- access-app-id:
Provide the app ID of a GitHub App used to access private repositories. When registering the app in the organization, disable webhook functionality and grant read-only repository permissions for “Contents”. After completing app registration, generate a private key and install the app, giving it access to selected repositories as appropriate.
- access-key:
Log into the GitHub App used to access private repositories with this private key.
- owner:
Access private repositories owned by this GitHub account or organization, overriding github.repository_owner.