Skip to content

Commit 50d34f4

Browse files
committed
ci: use custom ci because the recommended config result in a error
conventional-changelog/commitlint#4132
1 parent 0bf423b commit 50d34f4

File tree

1 file changed

+14
-15
lines changed

1 file changed

+14
-15
lines changed

.github/workflows/commitlint.yml

Lines changed: 14 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,36 +1,35 @@
1-
name: 📝 Commitlint
1+
name: Commitlint
22

33
on: [push, pull_request]
4+
permissions:
5+
contents: write
6+
pull-requests: write
47

58
jobs:
69
commitlint:
7-
runs-on: ubuntu-22.04
10+
runs-on: ubuntu-latest
11+
812
steps:
9-
- uses: actions/checkout@v3
13+
- uses: actions/checkout@v4
14+
- name: Install Node.js
15+
uses: actions/setup-node@v4
1016
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
2019
run: |
2120
git --version
2221
node --version
2322
npm --version
2423
npx commitlint --version
25-
- name: Install commitlint
24+
- name: 📦️ Install commitlint
2625
run: |
2726
npm install conventional-changelog-conventionalcommits
2827
npm install commitlint@latest
2928
30-
- name: Validate current commit (last commit) with commitlint
29+
- name: Validate current commit (last commit) with commitlint
3130
if: github.event_name == 'push'
3231
run: npx commitlint --last --verbose
3332

34-
- name: Validate PR commits with commitlint
33+
- name: Validate PR commits with commitlint
3534
if: github.event_name == 'pull_request'
3635
run: npx commitlint --from ${{ github.event.pull_request.head.sha }}~${{ github.event.pull_request.commits }} --to ${{ github.event.pull_request.head.sha }} --verbose

0 commit comments

Comments
 (0)