commitlint as a GitHub Action
name: commit-lint
on: [push, pull_request]
jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: ahmadnassri/action-commit-lint@v2name: commit-lint
on: [push, pull_request]
jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: ahmadnassri/action-commit-lint@v2
with:
config: angularname: commit-lint
on: [push, pull_request]
jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: ahmadnassri/action-commit-lint@v2
with:
config: ./path/to/commitlint.configNotes for custom rules:
- must use
action/checkoutfirst_configis relative to your repo's root- config file format must follow
commitlintconfiguration format
| output | type | required | default | description |
|---|---|---|---|---|
token |
input | ❌ | - |
The GitHub token used to inspect the pull-request commits |
config |
input | ❌ | conventional |
name of config to use, or path to config file |
report |
output | N/A |
- |
a JSON object with the full commitlint report data |
the following are available without any additional requirement
Author: Ahmad Nassri • Twitter: @AhmadNassri