Skip to content

Commit 06717e0

Browse files
committed
ci: Add commit check action
1 parent 7c6f1b3 commit 06717e0

File tree

1 file changed

+32
-0
lines changed

1 file changed

+32
-0
lines changed

.github/workflows/commit-check.yml

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
---
2+
name: Commit Check
3+
on:
4+
push:
5+
pull_request:
6+
branches:
7+
- main
8+
9+
jobs:
10+
commit-check:
11+
runs-on: ubuntu-latest
12+
permissions: # use permissions because of use pr-comments
13+
contents: read
14+
pull-requests: write
15+
steps:
16+
- uses: actions/checkout@v4
17+
with:
18+
ref: ${{ github.event.pull_request.head.sha }} # checkout PR HEAD commit
19+
fetch-depth: 0 # required for merge-base check
20+
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+
message: true
26+
branch: false
27+
author-name: true
28+
author-email: true
29+
commit-signoff: false
30+
merge-base: false
31+
job-summary: true
32+
pr-comments: ${{ github.event_name == 'pull_request' }}

0 commit comments

Comments
 (0)