Skip to content

Commit

Permalink
take golangci-lint version from go.mod
Browse files Browse the repository at this point in the history
  • Loading branch information
lovromazgon committed Nov 30, 2023
1 parent e9aa76d commit be37661
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}

0 comments on commit be37661

Please sign in to comment.