From be3766170094e62f8e0e2dc10968ea5db30e4029 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lovro=20Ma=C5=BEgon?= Date: Thu, 30 Nov 2023 19:52:55 +0100 Subject: [PATCH] take golangci-lint version from go.mod --- .github/workflows/lint.yml | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 194c087..8b846ae 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -14,7 +14,16 @@ jobs: with: go-version-file: 'go.mod' + # This step sets up the variable steps.golangci-lint-version.outputs.v + # to contain the version of golangci-lint (e.g. v1.54.2). + # The version is taken from go.mod. + - name: Golangci-lint version + id: golangci-lint-version + run: | + GOLANGCI_LINT_VERSION=$( go list -m -f '{{.Version}}' github.com/golangci/golangci-lint ) + echo "v=$GOLANGCI_LINT_VERSION" >> "$GITHUB_OUTPUT" + - name: golangci-lint uses: golangci/golangci-lint-action@v3 with: - version: v1.55.2 + version: ${{ steps.golangci-lint-version.outputs.v }}