From 357bed3edafe7e5ba1a428a60f5e199449d8136b Mon Sep 17 00:00:00 2001 From: Nawaz Hussain Khazielakha Date: Mon, 7 Oct 2024 11:16:01 -0700 Subject: [PATCH] remove unnecassary caching of of golangci-lint golangci-lint step auto caches the binary. Explicit caching step is not needed anymore. Refer to https://github.com/golangci/golangci-lint-action?tab=readme-ov-file#internals Of course, we could cache a specific version of golangci-lint instead of go.mod hash. But effort to create that logic outweighs its impact. However, golangci-lint.cache-{runner_os}-{working_directory}-{interval_number}-{go.mod_hash} has its advantages; it updates itself with go.mod changes. We delete older caches using auto delete cache workflow. --- .github/workflows/pr-golangci-lint.yaml | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/.github/workflows/pr-golangci-lint.yaml b/.github/workflows/pr-golangci-lint.yaml index 2a0698d876b..16853a24b93 100644 --- a/.github/workflows/pr-golangci-lint.yaml +++ b/.github/workflows/pr-golangci-lint.yaml @@ -29,17 +29,6 @@ jobs: with: go-version: ${{ steps.vars.outputs.go_version }} - - name: Cache golangci-lint binary - id: golangci-cache - uses: actions/cache@v4 - 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@971e284b6050e8a5849b72094c50ab08da042db8 # tag=v6.1.1 with: