File tree 1 file changed +14
-15
lines changed 1 file changed +14
-15
lines changed Original file line number Diff line number Diff line change 1
- name : 📝 Commitlint
1
+ name : ✨ Commitlint
2
2
3
3
on : [push, pull_request]
4
+ permissions :
5
+ contents : write
6
+ pull-requests : write
4
7
5
8
jobs :
6
9
commitlint :
7
- runs-on : ubuntu-22.04
10
+ runs-on : ubuntu-latest
11
+
8
12
steps :
9
- - uses : actions/checkout@v3
13
+ - uses : actions/checkout@v4
14
+ - name : Install Node.js
15
+ uses : actions/setup-node@v4
10
16
with :
11
- fetch-depth : 0
12
- - name : Install required dependencies
13
- run : |
14
- apt update
15
- apt install -y sudo
16
- sudo apt install -y git curl
17
- curl -sL https://deb.nodesource.com/setup_14.x | sudo -E bash -
18
- sudo DEBIAN_FRONTEND=noninteractive apt install -y nodejs
19
- - name : Print versions
17
+ node-version-file : ' .nvmrc'
18
+ - name : 🔍️ Print versions
20
19
run : |
21
20
git --version
22
21
node --version
23
22
npm --version
24
23
npx commitlint --version
25
- - name : Install commitlint
24
+ - name : 📦️ Install commitlint
26
25
run : |
27
26
npm install conventional-changelog-conventionalcommits
28
27
npm install commitlint@latest
29
28
30
- - name : Validate current commit (last commit) with commitlint
29
+ - name : ✨ Validate current commit (last commit) with commitlint
31
30
if : github.event_name == 'push'
32
31
run : npx commitlint --last --verbose
33
32
34
- - name : Validate PR commits with commitlint
33
+ - name : ✨ Validate PR commits with commitlint
35
34
if : github.event_name == 'pull_request'
36
35
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