-
Notifications
You must be signed in to change notification settings - Fork 9
103 lines (88 loc) · 2.72 KB
/
check.yaml
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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
---
name: Check
on:
push:
pull_request:
types:
- opened
- edited
- synchronize
- reopened
jobs:
check-latest-commit:
name: Check Latest Commit Message
if: github.event_name == 'push'
runs-on: ubuntu-latest
steps:
- name: Checkout Code
uses: actions/checkout@v4
- name: Check Latest Commit Message
run: make test-commit
check-commits:
name: Check Commit Messages
runs-on: ubuntu-latest
if: github.event_name == 'pull_request'
steps:
- name: Checkout Code
uses: actions/checkout@v4
- name: Get PR Commits
id: get-pr-commits
uses: tim-actions/get-pr-commits@master
with:
token: ${{ secrets.GITHUB_TOKEN }}
- name: Check Commit Messages
uses: tim-actions/[email protected]
with:
commits: ${{ steps.get-pr-commits.outputs.commits }}
pattern: '^((build|chore|ci|docs|feat|fix|perf|refactor|revert|style|test|¯\\_\(ツ\)_\/¯)(\(\w+\))?(!)?(: (.*\s*)*))|(Merge (.*\s*)*)|(Initial commit$)(\n.*)*$'
error: |
commit message check failed:
message is not conventional commits format
please see https://www.conventionalcommits.org/en/v1.0.0/#specification
check-pull-request-title:
name: Check Pull Request Title
runs-on: ubuntu-latest
if: github.event_name == 'pull_request'
steps:
- name: Checkout Code
uses: actions/checkout@v4
- name: Check Pull Request Title
uses: deepakputhraya/action-pr-title@master
with:
regex: '^((build|chore|ci|docs|feat|fix|perf|refactor|revert|style|test|¯\\_\(ツ\)_\/¯)(\(\w+\))?(!)?(: (.*\s*)*))|(Merge (.*\s*)*)|(Initial commit$)(\n.*)*$'
dco-check:
name: DCO Check
if: github.event_name == 'pull_request'
runs-on: ubuntu-latest
steps:
- name: Get PR Commits
id: get-pr-commits
uses: tim-actions/get-pr-commits@master
with:
token: ${{ secrets.GITHUB_TOKEN }}
- name: DCO Check
uses: tim-actions/dco@master
with:
commits: ${{ steps.get-pr-commits.outputs.commits }}
license-check:
name: Check License Lines
runs-on: ubuntu-latest
steps:
- name: Checkout Code
uses: actions/checkout@v4
- name: Check License Lines
uses: kt3k/[email protected]
lint:
name: Lint
runs-on: ubuntu-latest
steps:
- uses: actions/setup-go@v5
with:
go-version: "1.22"
- name: Checkout Code
uses: actions/checkout@v4
- name: Lint
uses: golangci/golangci-lint-action@v3
with:
version: v1.57.1
args: --timeout 3m