-
Notifications
You must be signed in to change notification settings - Fork 4
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.4.1@sha256:a8ef3ffdcb3c7f97165763d1843acd84e0096c0bb001f2167b08ad8a2964b5a5
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