GitHub Action for running pre-commit hooks against the repository. Conditionally installs tools needed for the Action to be able to perform its duties such as npm
, pre-commit
, etc.
Basic usage with default options:
jobs:
lint:
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- uses: open-turo/action-pre-commit@v2
Overriding defaults:
jobs:
lint:
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- uses: open-turo/action-pre-commit@v2
with:
# Override the config file used by default
config-file: .commitlintrc.yaml
# Don't include `@turo/conventional-commit` configuration
turo-conventional-commit: false
# Only run pre-commit against changed files, instead of all files
only-changed: true
parameter | description | required | default |
---|---|---|---|
config-file | The config file to present to commitlint-github-action | true |
.commitlintrc.yaml |
turo-conventional-commit | Set this to "false" to customize conventional commit configuration | true |
true |
only-changed | Set this to "true" to only run pre-commit against changed files, and not the entire repository | false |
|
s3-bucket-name | S3 bucket name to cache node_modules to speed up dependency installation. | false |
|
s3-bucket-region | S3 bucket region to cache node_modules to speed up dependency installation. | false |
parameter | description |
---|---|
cache-hit | Whether the cache was hit when installing dependencies |
This action is a composite
action.
Please review Issues, post new Issues against this repository as needed.
Please see here for guidelines on how to contribute to this project.