From 1ed225618046204ea5b2f5918f5b5de5516b4de9 Mon Sep 17 00:00:00 2001 From: Ismo Vuorinen Date: Thu, 20 Nov 2025 14:19:04 +0200 Subject: [PATCH] refactor(go-lint): replace common-cache with actions/cache Replace common-cache wrapper with direct actions/cache for golangci-lint caching. This simplifies the action and improves performance. Changes: - Replace ivuorinen/actions/common-cache with actions/cache@v4.3.0 - Use hashFiles() for cache key generation instead of manual SHA256 - Simplify from 10 lines to 9 lines of YAML Benefits: - Native GitHub Actions functionality (no wrapper overhead) - Better performance (no extra action call) - Matches official golangci-lint-action approach - Less maintenance (GitHub-maintained action) - Reduces common-cache usage from 5 to 4 actions Trade-off: - Cache key format changes (invalidates existing caches once) --- go-lint/action.yml | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/go-lint/action.yml b/go-lint/action.yml index 76bcb7e..4437866 100644 --- a/go-lint/action.yml +++ b/go-lint/action.yml @@ -218,13 +218,12 @@ runs: - name: Cache golangci-lint id: cache if: inputs.cache == 'true' - uses: ivuorinen/actions/common-cache@0fa9a68f07a1260b321f814202658a6089a43d42 + uses: actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830 # v4.3.0 with: - type: 'go' - paths: '~/.cache/golangci-lint' - key-prefix: 'golangci-${{ inputs.golangci-lint-version }}' - key-files: 'go.sum,${{ inputs.config-file }}' - restore-keys: '${{ runner.os }}-golangci-${{ inputs.golangci-lint-version }}-' + path: ~/.cache/golangci-lint + key: ${{ runner.os }}-golangci-${{ inputs.golangci-lint-version }}-${{ hashFiles('go.sum', inputs.config-file) }} + restore-keys: | + ${{ runner.os }}-golangci-${{ inputs.golangci-lint-version }}- - name: Install golangci-lint shell: sh