Skip to content

Latest commit

 

History

History
87 lines (69 loc) · 3.3 KB

README.md

File metadata and controls

87 lines (69 loc) · 3.3 KB

open-turo/action-pre-commit

Description

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.

Release Tests pass/fail License Contributions welcome CI semantic-release: angular Conventional commits Join us!

Usage

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

Inputs

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

Outputs

parameter description
cache-hit Whether the cache was hit when installing dependencies

Runs

This action is a composite action.

Get Help

Please review Issues, post new Issues against this repository as needed.

Contributions

Please see here for guidelines on how to contribute to this project.