diff --git a/.github/workflows/pr-golangci-lint.yaml b/.github/workflows/pr-golangci-lint.yaml index c61271c9032b..0be8b03a914d 100644 --- a/.github/workflows/pr-golangci-lint.yaml +++ b/.github/workflows/pr-golangci-lint.yaml @@ -19,16 +19,31 @@ jobs: - test steps: - uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # tag=v4.1.7 + - name: Calculate go version id: vars run: echo "go_version=$(make go-version)" >> $GITHUB_OUTPUT + - name: Set up Go uses: actions/setup-go@0a12ed9d6a96ab950c8f026ed9f722fe0da7ef32 # tag=v5.0.2 with: go-version: ${{ steps.vars.outputs.go_version }} + + - name: Cache golangci-lint binary + id: golangci-cache + uses: actions/cache@v3 + with: + # Cache location used by golangci-lint-action + path: ~/.cache/golangci-lint + # Change this when updating golangci-lint version + key: golangci-lint-v1.60.2 + restore-keys: | + golangci-lint- + - name: golangci-lint uses: golangci/golangci-lint-action@aaa42aa0628b4ae2578232a66b541047968fac86 # tag=v6.1.0 with: + # update the version when updating golangci-lint version: v1.60.2 args: --out-format=colored-line-number working-directory: ${{matrix.working-directory}}