diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index faf66be3..ca5421cf 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -17,10 +17,8 @@ jobs: uses: actions/setup-go@v1 with: go-version: ${{ steps.go-version.outputs.minimal }} - - name: golangci-lint - uses: golangci/golangci-lint-action@v2 - with: - version: v1.42.1 + - name: Run lint + run: make lint build: runs-on: ubuntu-latest steps: diff --git a/hack/lint.sh b/hack/lint.sh index d7e6b849..fe206bab 100755 --- a/hack/lint.sh +++ b/hack/lint.sh @@ -1,8 +1,7 @@ #!/bin/bash -xe -golangci_lint_version=v1.42.1 -if [ ! -f $(go env GOPATH)/bin/golangci-lint ]; then - curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(go env GOPATH)/bin $golangci_lint_version -fi -golangci-lint run +version=v1.42.1 +timeout=5m + +go run github.com/golangci/golangci-lint/cmd/golangci-lint@$version run --timeout $timeout