Skip to content

Commit 46dbd7a

Browse files
committed
ci: Add commitlint to CI
1 parent 6b3933f commit 46dbd7a

File tree

2 files changed

+29
-0
lines changed

2 files changed

+29
-0
lines changed
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
name: Lint Commits
2+
3+
on:
4+
workflow_call:
5+
6+
jobs:
7+
lint:
8+
runs-on: ubuntu-latest
9+
permissions:
10+
contents: read
11+
pull-requests: read
12+
steps:
13+
- name: Checkout Source
14+
uses: actions/[email protected]
15+
with:
16+
fetch-depth: 0
17+
18+
- name: Lint Commits
19+
uses: wagoid/[email protected]
20+
with:
21+
failOnWarnings: true

.github/workflows/ci.yaml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,14 @@ on:
55
pull_request:
66

77
jobs:
8+
commit_lint:
9+
# Deduplicate jobs from pull requests and branch pushes within the same repo.
10+
if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name != github.repository
11+
permissions:
12+
contents: read
13+
pull-requests: read
14+
uses: ./.github/workflows/_commit_lint.yaml
15+
816
devcontainer:
917
# Deduplicate jobs from pull requests and branch pushes within the same repo.
1018
if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name != github.repository

0 commit comments

Comments
 (0)