diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 8189dce8..a92b35a9 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -21,9 +21,6 @@ concurrency: group: ${{ github.ref_name }}-lint cancel-in-progress: true -env: - GOLANGCI_TIMEOUT: 10m0s - jobs: lint: @@ -32,7 +29,12 @@ jobs: steps: - name: Checkout Repository uses: actions/checkout@v2 - - name: Lint Code - uses: golangci/golangci-lint-action@v2 + - name: Output Variables + id: vars + run: echo "::set-output name=go_version::$(grep "go 1." go.mod | cut -d " " -f 2)" + - name: Setup Golang Environment + uses: actions/setup-go@v2 with: - args: --timeout ${{ env.GOLANGCI_TIMEOUT }} + go-version: ${{ steps.vars.outputs.go_version }} + - name: Lint Code + uses: golangci/golangci-lint-action@v3 diff --git a/.golangci.yml b/.golangci.yml index 19af8915..a29ee394 100644 --- a/.golangci.yml +++ b/.golangci.yml @@ -60,3 +60,5 @@ linters: issues: max-issues-per-linter: 0 max-same-issues: 0 +run: + timeout: 5m