Skip to content

Commit 47b0419

Browse files
committed
feat(gha): added a new action to check for commit msg compliance
1 parent 0b7c246 commit 47b0419

File tree

1 file changed

+34
-0
lines changed

1 file changed

+34
-0
lines changed

.github/workflows/ci.commit.check.yml

+34
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
name: "CI: Commit Check"
2+
3+
on:
4+
pull_request:
5+
branches: [main]
6+
# This check runs on every push to repository
7+
push:
8+
branches: [main]
9+
10+
jobs:
11+
commit-check:
12+
runs-on: ubuntu-latest
13+
permissions: # use permissions because of use pr-comments
14+
contents: read
15+
pull-requests: write
16+
steps:
17+
- uses: actions/[email protected]
18+
with:
19+
ref: ${{ github.event.pull_request.head.sha }} # checkout PR HEAD commit
20+
fetch-depth: 0 # required for merge-base check
21+
- uses: commit-check/commit-check-action@v1
22+
env:
23+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # use GITHUB_TOKEN because of use pr-comments
24+
with:
25+
# Conventional Commits Check
26+
message: true
27+
# Convention Branch Check
28+
branch: false
29+
author-name: true
30+
author-email: true
31+
commit-signoff: false
32+
merge-base: true
33+
job-summary: true
34+
pr-comments: ${{ github.event_name == 'pull_request' }}

0 commit comments

Comments
 (0)