mirror of
https://github.com/Bismuth-Forge/bismuth.git
synced 2024-09-17 11:37:10 +03:00
ci: 👷 add commit linting
Add commit linting according to the Conventional Commits spec.
This commit is contained in:
parent
88a2ea2d0c
commit
3f7d922fea
25
.github/workflows/commit-lint.yml
vendored
Normal file
25
.github/workflows/commit-lint.yml
vendored
Normal file
@ -0,0 +1,25 @@
|
|||||||
|
# SPDX-FileCopyrightText: none
|
||||||
|
#
|
||||||
|
# SPDX-License-Identifier: MIT
|
||||||
|
|
||||||
|
---
|
||||||
|
name: Conventional Commits
|
||||||
|
on: [pull_request]
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
lint-commits:
|
||||||
|
name: Lint Commits
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: Checkout 🛎️
|
||||||
|
uses: actions/checkout@v2.3.1
|
||||||
|
with:
|
||||||
|
fetch-depth: 0
|
||||||
|
- name: Install Commit Linting Tool 🔧
|
||||||
|
run: npm install --save-dev @commitlint/{cli,config-conventional}
|
||||||
|
- name: Set Linting Config to Conventional Commits spec 🔧
|
||||||
|
run: |
|
||||||
|
echo "module.exports = { extends: ['@commitlint/config-conventional'] };" > commitlint.config.js
|
||||||
|
- name: Lint 🚨
|
||||||
|
run: npx commitlint --from HEAD~1 --to HEAD --verbose
|
Loading…
Reference in New Issue
Block a user