-
-
Notifications
You must be signed in to change notification settings - Fork 12
33 lines (29 loc) · 918 Bytes
/
commitlint.yml
File metadata and controls
33 lines (29 loc) · 918 Bytes
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
name: CommitLint
on:
pull_request:
types:
- opened
- synchronize
- reopened
- edited
push:
branches:
- main
permissions:
contents: read
concurrency:
cancel-in-progress: true
group: ${{ github.workflow }}-${{ github.ref }}
jobs:
commitlint:
container:
image: commitlint/commitlint:20.1.0@sha256:caf971bc6ab2744d20f9967df648f210d6e79dda4055748d183d31700986f115
runs-on: ubuntu-24.04
steps:
- run: env | sort
- name: Validate the latest commit message with commitlint
if: github.event_name == 'push'
run: echo "${{ github.event.head_commit.message }}" | npx commitlint -x @commitlint/config-conventional
- name: Validate pull request title with commitlint
if: github.event_name == 'pull_request'
run: echo "${{ github.event.pull_request.title }}" | npx commitlint -x @commitlint/config-conventional