perf: add cache-build option and upgrade to v6.2.0

Add `cache-build` input (default: false) to control whether GOCACHE is
included in the cache. This dramatically reduces cache size from ~1.2GB
to ~200-400MB by excluding build artifacts that have low reuse across
code changes.

Also upgrades dependencies (@actions/cache v5, semver v7.7) and runtime
to node24 to align with upstream actions/setup-go.

https://claude.ai/code/session_01CqrWSjzGgd7Zi6LyJkd9XW
This commit is contained in:
Claude 2026-04-04 17:58:19 +00:00
parent f21630a9ad
commit cf0b11600c
No known key found for this signature in database
9 changed files with 198948 additions and 67104 deletions

View file

@ -15,6 +15,9 @@ inputs:
cache:
description: Used to specify whether caching is needed. Set to true, if you'd like to enable caching.
default: true
cache-build:
description: 'Whether to cache the Go build cache (GOCACHE) in addition to the module cache (GOMODCACHE). Set to true to include build cache.'
default: false
cache-dependency-path:
description: 'Used to specify the path to a dependency file - go.sum'
cache-key-prefix:
@ -28,7 +31,7 @@ outputs:
cache-hit:
description: 'A boolean value to indicate if a cache was hit'
runs:
using: 'node20'
using: 'node24'
main: 'dist/setup/index.js'
post: 'dist/cache-save/index.js'
post-if: success()