File tree Expand file tree Collapse file tree 2 files changed +74
-0
lines changed Expand file tree Collapse file tree 2 files changed +74
-0
lines changed Original file line number Diff line number Diff line change 1+ version : 2
2+ updates :
3+ - package-ecosystem : gomod
4+ directory : /
5+ schedule :
6+ interval : weekly
7+ open-pull-requests-limit : 1
8+ rebase-strategy : disabled
9+ labels :
10+ - kind/bot
11+
12+ - package-ecosystem : github-actions
13+ directory : /
14+ schedule :
15+ interval : daily
16+ open-pull-requests-limit : 1
17+ rebase-strategy : disabled
18+ labels :
19+ - kind/bot
Original file line number Diff line number Diff line change 1+ name : check
2+
3+ env :
4+ # Common versions
5+ GO_VERSION : ' 1.22'
6+ TZ : Asia/Shanghai
7+
8+ permissions : write-all
9+
10+ on :
11+ push :
12+ branches :
13+ - ' *'
14+ paths :
15+ - ' **.go'
16+ - ' go.mod'
17+ - ' .github/workflows/*.yml'
18+ pull_request :
19+ branches :
20+ - " *"
21+ paths :
22+ - ' **.go'
23+
24+ jobs :
25+ lint :
26+ runs-on : ubuntu-latest
27+ steps :
28+ - name : Checkout
29+ uses : actions/checkout@v4
30+ with :
31+ submodules : true
32+ - name : Setup Go
33+ uses : actions/setup-go@v5
34+ with :
35+ go-version : ${{ env.GO_VERSION }}
36+ check-latest : true
37+ - name : Cache Go Dependencies
38+ uses : magnetikonline/action-golang-cache@v5
39+ with :
40+ go-version-file : go.mod
41+ - name : install task
42+ run : |
43+ echo "install task"
44+ go install github.com/go-task/task/v3/cmd/task@latest
45+ - name : Run Linter
46+ run : |
47+ task lint
48+ modifyCode=$(git status -s | grep M | wc -l)
49+ git status -s
50+ if [ $modifyCode -eq 0 ] ; then
51+ echo "Lic check ok"
52+ else
53+ echo "Failed git modify files num is $modifyCode. Lic check error,please exec 'task gencopyright' in your code "
54+ exit -1
55+ fi
You can’t perform that action at this time.
0 commit comments