@@ -49,27 +49,19 @@ jobs:
49
49
uses : ls-lint/action@02e380fe8733d499cbfc9e22276de5085508a5bd # v2.3.1
50
50
- name : Run shellcheck
51
51
run : find . -name '*.sh' | xargs shellcheck
52
- - name : Install shfmt
53
- run :
go install mvdan.cc/sh/v3/cmd/[email protected]
54
52
- name : Run shfmt
55
- run : find . -name '*.sh' | xargs shfmt -s -d
53
+ run : find . -name '*.sh' | xargs go tool -modfile=./hack/tools/go.mod shfmt -s -d
56
54
- name : Check hyperlinks
57
55
uses : docker://dkhamsing/awesome_bot:latest@sha256:a8adaeb3b3bd5745304743e4d8a6d512127646e420544a6d22d9f58a07f35884
58
56
with :
59
57
args : /github/workspace/README.md --allow-dupe --allow-redirect --request-delay 1 --white-list https://img.shields.io,http://127.0.0.1:8080,https://github.com/lima-vm/lima/releases/download,https://xbarapp.com,https://api.github.com
60
- - name : Install go-licenses
61
- run :
go install github.com/google/[email protected]
62
58
- name : Check licenses
63
59
# the allow list corresponds to https://github.com/cncf/foundation/blob/e5db022a0009f4db52b89d9875640cf3137153fe/allowed-third-party-license-policy.md
64
- run : go-licenses check --include_tests ./... --allowed_licenses=$(cat ./hack/allowed-licenses.txt)
65
- - name : Install ltag
66
- run :
go install github.com/containerd/[email protected]
60
+ run : go tool -modfile=./hack/tools/go-licenses.mod go-licenses check --include_tests ./... --allowed_licenses=$(cat ./hack/allowed-licenses.txt)
67
61
- name : Check license boilerplates
68
- run : ltag -t ./hack/ltag --check -v
69
- - name : Install protolint
70
- run :
go install github.com/yoheimuta/protolint/cmd/[email protected]
62
+ run : go tool -modfile=./hack/tools/go.mod ltag -t ./hack/ltag --check -v
71
63
- name : Check protobuf files
72
- run : protolint .
64
+ run : go tool -modfile=./hack/tools/go.mod protolint .
73
65
74
66
lint-go :
75
67
name : " Lint Go"
@@ -92,10 +84,14 @@ jobs:
92
84
- uses : actions/setup-go@d35c59abb061a4a6fb18e82ac0862c26744d6ab5 # v5.5.0
93
85
with :
94
86
go-version : 1.24.x
87
+ - id : golangci-lint-version
88
+ working-directory : hack/tools
89
+ run : |
90
+ echo "GOLANGCI_LINT_VERSION=$(go list -m -f '{{.Version}}' github.com/golangci/golangci-lint/v2)" >> $GITHUB_OUTPUT
95
91
- name : Run golangci-lint
96
92
uses : golangci/golangci-lint-action@4afd733a84b1f43292c63897423277bb7f4313a9 # v8.0.0
97
93
with :
98
- version : v2.2
94
+ version : ${{ steps.golangci-lint-version.outputs.GOLANGCI_LINT_VERSION }}
99
95
args : --verbose
100
96
101
97
security :
0 commit comments