From c30d5c3f4440fceabeac8798da66314d2044dc6b Mon Sep 17 00:00:00 2001 From: Benjamin Wang Date: Thu, 16 Nov 2023 13:42:25 +0000 Subject: [PATCH] get golangci-lint't version from tools/mod for golangci/golangci-lint-action Signed-off-by: Benjamin Wang --- .github/workflows/static-analysis.yaml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/static-analysis.yaml b/.github/workflows/static-analysis.yaml index d1c4394ae34..6e3ddcfc781 100644 --- a/.github/workflows/static-analysis.yaml +++ b/.github/workflows/static-analysis.yaml @@ -12,10 +12,12 @@ jobs: - uses: actions/setup-go@93397bea11091df50f3d7e59dc26a7711a8bcfbe # v4.1.0 with: go-version: ${{ steps.goversion.outputs.goversion }} + - id: golangci-lint-version + run: echo "golangci-lint-version=$(cd tools/mod && go list -m -f {{.Version}} github.com/golangci/golangci-lint)" >> "$GITHUB_OUTPUT" - name: golangci-lint uses: golangci/golangci-lint-action@3a919529898de77ec3da873e3063ca4b10e7f5cc # v3.7.0 with: - version: v1.55.2 + version: ${{ steps.golangci-lint-version.outputs.golangci-lint-version }} args: --config tools/.golangci.yaml - name: protoc uses: arduino/setup-protoc@149f6c87b92550901b26acd1632e11c3662e381f # v1.3.0