-
Notifications
You must be signed in to change notification settings - Fork 30
43 lines (40 loc) · 1.29 KB
/
ci.commit.check.yml
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
34
35
36
37
38
39
40
41
42
43
name: "CI: Commit Check"
on:
pull_request:
branches: [main]
# This check runs on every push to repository
push:
branches: [main]
permissions:
contents: read
jobs:
commit-check:
runs-on: ubuntu-latest
permissions: # use permissions because of use pr-comments
contents: read
pull-requests: write
steps:
- name: Harden Runner
uses: step-security/harden-runner@0080882f6c36860b6ba35c610c98ce87d4e2f26f # v2.10.2
with:
egress-policy: audit
- name: Checkout code
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
ref: ${{ github.event.pull_request.head.sha }} # checkout PR HEAD commit
fetch-depth: 0 # required for merge-base check
- name: Run Commit Check
uses: commit-check/commit-check-action@cd614c1cb08de72a55a5ec4aaab7f30ca9ba4d69 # v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # use GITHUB_TOKEN because of use pr-comments
with:
# Conventional Commits Check
message: true
# Convention Branch Check
branch: false
author-name: true
author-email: true
commit-signoff: false
merge-base: true
job-summary: true
pr-comments: false