mirror of
https://github.com/ivuorinen/actions.git
synced 2026-03-05 11:55:00 +00:00
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)
This commit is contained in:
@@ -218,13 +218,12 @@ runs:
|
|||||||
- name: Cache golangci-lint
|
- name: Cache golangci-lint
|
||||||
id: cache
|
id: cache
|
||||||
if: inputs.cache == 'true'
|
if: inputs.cache == 'true'
|
||||||
uses: ivuorinen/actions/common-cache@0fa9a68f07a1260b321f814202658a6089a43d42
|
uses: actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830 # v4.3.0
|
||||||
with:
|
with:
|
||||||
type: 'go'
|
path: ~/.cache/golangci-lint
|
||||||
paths: '~/.cache/golangci-lint'
|
key: ${{ runner.os }}-golangci-${{ inputs.golangci-lint-version }}-${{ hashFiles('go.sum', inputs.config-file) }}
|
||||||
key-prefix: 'golangci-${{ inputs.golangci-lint-version }}'
|
restore-keys: |
|
||||||
key-files: 'go.sum,${{ inputs.config-file }}'
|
${{ runner.os }}-golangci-${{ inputs.golangci-lint-version }}-
|
||||||
restore-keys: '${{ runner.os }}-golangci-${{ inputs.golangci-lint-version }}-'
|
|
||||||
|
|
||||||
- name: Install golangci-lint
|
- name: Install golangci-lint
|
||||||
shell: sh
|
shell: sh
|
||||||
|
|||||||
Reference in New Issue
Block a user