-
Notifications
You must be signed in to change notification settings - Fork 5
87 lines (75 loc) · 2.35 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
---
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@v3
- name: Check Latest Commit Message
run: test/scripts/commit-check-latest.sh
check-commits:
name: Check Commit Messages
runs-on: ubuntu-latest
if: github.event_name == 'pull_request'
steps:
- name: Checkout Code
uses: actions/checkout@v3
- name: Get PR Commits
id: get-pr-commits
uses: tim-actions/[email protected]
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@v3
- name: Check Pull Request Title
uses: deepakputhraya/[email protected]
with:
regex: '^((build|chore|ci|docs|feat|fix|perf|refactor|revert|style|test|¯\\_\(ツ\)_\/¯)(\(\w+\))?(!)?(: (.*\s*)*))|(Merge (.*\s*)*)|(Initial commit$)(\n.*)*$'
# license-check:
# name: Check License Lines
# runs-on: ubuntu-latest
# steps:
# - name: Checkout Code
# uses: actions/checkout@v3
#
# - name: Check License Lines
# uses: kt3k/[email protected]
lint:
name: Lint
runs-on: ubuntu-latest
steps:
- uses: actions/setup-go@v3
with:
go-version: "1.20"
- name: Checkout Code
uses: actions/checkout@v3
- name: Lint
uses: golangci/golangci-lint-action@v3
with:
version: v1.52.2
args: --timeout 5m