File tree Expand file tree Collapse file tree 1 file changed +40
-0
lines changed
Expand file tree Collapse file tree 1 file changed +40
-0
lines changed Original file line number Diff line number Diff line change 1+ name : CI
2+
3+ on : [push, pull_request]
4+
5+ permissions :
6+ contents : read
7+
8+ jobs :
9+ commitlint :
10+ runs-on : ubuntu-latest
11+ steps :
12+ - uses : actions/checkout@v4
13+ with :
14+ fetch-depth : 0
15+
16+ - name : Setup node
17+ uses : actions/setup-node@v4
18+ with :
19+ node-version : lts/*
20+
21+ - name : Install commitlint
22+ run : npm install -D @commitlint/cli @commitlint/config-conventional
23+
24+ - name : Setup commitlint
25+ run : echo "export default { extends: ['@commitlint/config-conventional'] };" > commitlint.config.js
26+
27+ - name : Print versions
28+ run : |
29+ git --version
30+ node --version
31+ npm --version
32+ npx commitlint --version
33+
34+ - name : Validate current commit (last commit) with commitlint
35+ if : github.event_name == 'push'
36+ run : npx commitlint --last --verbose
37+
38+ - name : Validate PR commits with commitlint
39+ if : github.event_name == 'pull_request'
40+ run : npx commitlint --from ${{ github.event.pull_request.base.sha }} --to ${{ github.event.pull_request.head.sha }} --verbose
You can’t perform that action at this time.
0 commit comments