-
Notifications
You must be signed in to change notification settings - Fork 2
42 lines (34 loc) · 1.13 KB
/
ci:commit-msg.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
name: ci:commit-msg
on:
push:
branches:
- main
pull_request:
merge_group:
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true
jobs:
commit-msg:
name: Continuous integration (commit-msg)
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- name: Checkout 🛎️
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Install 💾
uses: ./.github/actions/install
- name: Lint last pushed commit 👕
if: github.event_name == 'push'
run: |
npm run check:commit-msg -- --last --verbose
- name: Lint PR commits 👕
if: github.event_name == 'pull_request'
run: |
npm run check:commit-msg -- --from ${{ github.event.pull_request.base.sha }} --to ${{ github.event.pull_request.head.sha }} --verbose
- name: Lint merge group commits 👕
if: github.event_name == 'merge_group'
run: |
npm run check:commit-msg -- --from ${{ github.event.merge_group.base_sha }} --to ${{ github.event.merge_group.head_sha }} --verbose