forked from bottlerocket-os/bottlerocket-core-kit
-
Notifications
You must be signed in to change notification settings - Fork 0
33 lines (31 loc) · 882 Bytes
/
Copy pathcommitlint.yml
File metadata and controls
33 lines (31 loc) · 882 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: Lint Commit Messages
on:
pull_request:
types:
- opened
- edited
- reopened
- synchronize
jobs:
commitlint:
if: github.repository == 'bottlerocket-os/bottlerocket-core-kit'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Setup Node
uses: actions/setup-node@v4
- name: Install commitlint
run: npm install @commitlint/cli @commitlint/types
- name: Lint commits in PR
env:
WORKSPACE: ${{ github.workspace }}
BASE_SHA: ${{ github.event.pull_request.base.sha }}
HEAD_SHA: ${{ github.event.pull_request.head.sha }}
run: |
npx commitlint \
-g "${WORKSPACE}/.commitlint.config.mjs" \
--from "${BASE_SHA}" \
--to "${HEAD_SHA}" \
--verbose