File tree Expand file tree Collapse file tree 1 file changed +25
-0
lines changed Expand file tree Collapse file tree 1 file changed +25
-0
lines changed Original file line number Diff line number Diff line change 1+ name : CI
2+ on : [push, pull_request]
3+ jobs :
4+ commitlint :
5+ runs-on : ubuntu-latest
6+ steps :
7+ - uses : actions/checkout@v3
8+ with :
9+ fetch-depth : 0
10+ - name : Print versions
11+ run : |
12+ git --version
13+ node --version
14+ npm --version
15+ npx commitlint --version
16+ - name : Install commitlint
17+ run : |
18+ npm install conventional-changelog-conventionalcommits
19+ npm install commitlint@latest
20+ - name : Validate current commit (last commit) with commitlint
21+ if : github.event_name == 'push'
22+ run : npx commitlint --from HEAD~1 --to HEAD --verbose
23+ - name : Validate PR commits with commitlint
24+ if : github.event_name == 'pull_request'
25+ run : npx commitlint --from ${{ github.event.pull_request.head.sha }}~${{ github.event.pull_request.commits }} --to ${{ github.event.pull_request.head.sha }} --verbose
You can’t perform that action at this time.
0 commit comments