Skip to content

Commit ea6ef44

Browse files
👷 chore: add commitlint to CI
1 parent 677859b commit ea6ef44

File tree

1 file changed

+28
-0
lines changed

1 file changed

+28
-0
lines changed

.github/workflows/ci.yml

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,34 @@ env:
1717
DOCKER_BUILDKIT: '1'
1818

1919
jobs:
20+
commitlint:
21+
name: Lint commit messages
22+
runs-on: ubuntu-latest
23+
24+
defaults:
25+
run:
26+
working-directory: frontend
27+
28+
steps:
29+
- uses: actions/checkout@v4
30+
with:
31+
fetch-depth: 0
32+
33+
- uses: actions/setup-node@v4
34+
with:
35+
node-version-file: 'frontend/.nvmrc'
36+
37+
- name: Install dependencies
38+
run: npm ci
39+
40+
- name: Validate current commit (last commit) with commitlint
41+
if: github.event_name == 'push'
42+
run: npx commitlint --last --verbose
43+
44+
- name: Validate PR commits with commitlint
45+
if: github.event_name == 'pull_request'
46+
run: npx commitlint --from ${{ github.event.pull_request.base.sha }} --to ${{ github.event.pull_request.head.sha }} --verbose
47+
2048
frontend-build:
2149
name: Build frontend
2250
runs-on: ubuntu-latest

0 commit comments

Comments
 (0)