Skip to content

Commit

Permalink
Merge pull request #11 from GG-157/main
Browse files Browse the repository at this point in the history
ci: update commitlint
  • Loading branch information
Norton-Lin authored Oct 13, 2024
2 parents e0dee16 + 6393df2 commit e176196
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions .github/workflows/commitlint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ name: Commitlint
on:
push:
branches-ignore: ["main"] # 排除 main 分支的 push 事件
pull_request:
branches-ignore: ["main"] # 排除 main 分支的 pull request 事件
pull_request: # 修正为 pull_request
# main 分支的 pull request 事件也会运行
workflow_dispatch:

jobs:
Expand All @@ -16,7 +16,7 @@ jobs:
fetch-depth: 0
- uses: actions/setup-node@v3
with:
node-version: '20'
node-version: '16' # 使用一个稳定的 Node.js 版本,比如 16
- run: npm install -g @commitlint/cli @commitlint/config-conventional
- run: |
echo "module.exports = {extends: ['@commitlint/config-conventional']}" > commitlint.config.js
Expand All @@ -27,3 +27,7 @@ jobs:
else
commitlint --from $(git rev-list --max-parents=0 HEAD) --to HEAD --verbose
fi

0 comments on commit e176196

Please sign in to comment.