Skip to content

Commit dd9e5d9

Browse files
ci(github): modularize workflow commitlint.yml from build.yml
1 parent d7ba9d7 commit dd9e5d9

File tree

2 files changed

+15
-5
lines changed

2 files changed

+15
-5
lines changed

.github/workflows/build.yml

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,6 @@ jobs:
88
steps:
99
- name: Checkout repository
1010
uses: actions/checkout@v3
11-
with:
12-
fetch-depth: 0
1311

1412
- name: Use Node.js
1513
uses: actions/setup-node@v3
@@ -27,9 +25,6 @@ jobs:
2725
if: steps.cache.outputs.cache-hit != 'true'
2826
run: npm install --prefer-offline
2927

30-
- name: Lint commit message
31-
run: npx commitlint --from=HEAD~1
32-
3328
- name: Lint JavaScript files
3429
run: npm run lint
3530

.github/workflows/commitlint.yml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
name: commitlint
2+
on: [push, pull_request]
3+
4+
jobs:
5+
commitlint:
6+
runs-on: ubuntu-latest
7+
8+
steps:
9+
- name: Checkout repository
10+
uses: actions/checkout@v3
11+
with:
12+
fetch-depth: 0
13+
14+
- name: Lint commit message
15+
run: npx commitlint --from=HEAD~1

0 commit comments

Comments
 (0)