mirror of
https://github.com/logto-io/logto.git
synced 2024-12-16 20:26:19 -05:00
Merge pull request #64 from logto-io/gao--add-commitlint-in-ci
chore: add commitlint workflow
This commit is contained in:
commit
9dcc472135
1 changed files with 35 additions and 0 deletions
35
.github/workflows/commitlint.yml
vendored
Normal file
35
.github/workflows/commitlint.yml
vendored
Normal file
|
@ -0,0 +1,35 @@
|
|||
name: Commitlint
|
||||
|
||||
on: [pull_request]
|
||||
|
||||
jobs:
|
||||
lint-commits:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
with:
|
||||
fetch-depth: 0
|
||||
|
||||
- uses: actions/setup-node@v2
|
||||
with:
|
||||
node-version: '14'
|
||||
|
||||
# https://github.com/pnpm/action-setup#use-cache-to-reduce-installation-time
|
||||
- name: Cache pnpm modules
|
||||
uses: actions/cache@v2
|
||||
with:
|
||||
path: ~/.pnpm-store
|
||||
key: ${{ runner.os }}-${{ hashFiles('**/pnpm-lock.yaml') }}
|
||||
restore-keys: |
|
||||
${{ runner.os }}-
|
||||
|
||||
- uses: pnpm/action-setup@v2.0.1
|
||||
with:
|
||||
version: 6.0.2
|
||||
run_install: false
|
||||
|
||||
- name: Install commitlint
|
||||
run: pnpm add -g @commitlint/{cli,config-conventional}
|
||||
|
||||
- name: Commitlint
|
||||
run: commitlint --from HEAD~${{ github.event.pull_request.commits }} --to HEAD
|
Loading…
Reference in a new issue