ci: use go install for golangci-lint instead of curl
Some checks failed
CI / Lint (push) Failing after 11s
CI / Test (push) Failing after 11s
CI / Build (push) Has been skipped
CI / Docker (push) Has been skipped

The curl-based install script downloads from raw.githubusercontent.com
which is unreliable in some network environments. go install is more
reliable and uses the Go module proxy.
This commit is contained in:
xfy 2026-06-12 11:19:59 +08:00
parent 34f37efa14
commit c2768a0f32

View File

@ -33,8 +33,7 @@ jobs:
fi
- name: Install golangci-lint
run: |
curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(go env GOPATH)/bin v2.1.0
run: go install github.com/golangci/golangci-lint/v2/cmd/golangci-lint@latest
- name: Run lint
run: golangci-lint run ./...