File tree 6 files changed +53
-5
lines changed
6 files changed +53
-5
lines changed Original file line number Diff line number Diff line change
1
+ mode : commit
2
+ min_length : 3
3
+ allowed :
4
+ - aspell
5
+ - repo
6
+ - yaml
7
+ - config
8
+ - Github
9
+ - Gitlab
10
+ - env
11
+ - failsafe
12
+ - golang
13
+ - mkdir
14
+ - WORKDIR
15
+ - apk
16
+ - ENTRYPOINT
17
+ - ubuntu
18
+ - golangci
19
+ - sudo
20
+ - releaser
21
+ - backend
22
+ - backends
23
+ - frontend
24
+ - frontends
25
+ - tcp
26
+ - crd
27
+ - linter
28
+ - linters
Original file line number Diff line number Diff line change 1
- name : Commit subject
1
+ name : HAProxy check commit message
2
2
on :
3
3
pull_request :
4
4
branches :
7
7
check :
8
8
runs-on : ubuntu-latest
9
9
steps :
10
- - name : check- commit
11
- uses : docker://haproxytech/check- commit:v2.1.0
10
+ - name : commit-policy
11
+ uses : docker://ghcr.io/ haproxytech/commit-check:5.0.4
12
12
env :
13
13
API_TOKEN : ${{ secrets.GITHUB_TOKEN }}
Original file line number Diff line number Diff line change @@ -4,6 +4,7 @@ cmd/dataplaneapi/*
4
4
.vscode /
5
5
.test /
6
6
bin /golangci-lint
7
+ bin /check-commit
7
8
8
9
# ignore Goland ide config
9
10
.idea
Original file line number Diff line number Diff line change @@ -57,10 +57,10 @@ gofumpt:
57
57
script :
58
58
- make gofumpt
59
59
- test -z "$(git diff 2> /dev/null)" || exit 'Go code not formatted, issue \`make gofumpt\` and commit the result'
60
- lint- commit-msg :
60
+ commit-policy :
61
61
stage : lint
62
62
image :
63
- name : $CI_REGISTRY_GO/check- commit:v2.1.0
63
+ name : $CI_REGISTRY_GO/commit-check:5.0.4
64
64
entrypoint : [""]
65
65
tags :
66
66
- go
Original file line number Diff line number Diff line change @@ -10,6 +10,7 @@ SWAGGER_VERSION=${shell curl -s https://raw.githubusercontent.com/haproxytech/cl
10
10
BUILD_DATE =$(shell date -u '+% Y-% m-% dT% H:% M:% SZ')
11
11
CGO_ENABLED? =0
12
12
GOLANGCI_LINT_VERSION =1.57.1
13
+ CHECK_COMMIT =5.0.4
13
14
14
15
all : update clean build
15
16
@@ -52,3 +53,12 @@ generate:
52
53
generate-native :
53
54
generate/swagger/script.sh
54
55
generate/post_swagger.sh
56
+
57
+ .PHONY : test
58
+ test :
59
+ go test ./...
60
+
61
+ .PHONY : check-commit
62
+ check-commit :
63
+ cd bin; CHECK_COMMIT=${CHECK_COMMIT} sh check-commit.sh
64
+ bin/check-commit
Original file line number Diff line number Diff line change
1
+ #! /bin/sh
2
+ V=$( ./check-commit tag)
3
+
4
+ if echo " $V " | grep -q " v$CHECK_COMMIT " ; then
5
+ echo " $V "
6
+ else
7
+ echo " go install github.com/haproxytech/check-commit/v5@v$CHECK_COMMIT "
8
+ GOBIN=$( pwd) go install github.com/haproxytech/check-commit/v5@v$CHECK_COMMIT
9
+ fi
You can’t perform that action at this time.
0 commit comments