refactor(ci): improve Go module caching strategy
Description
- refactor(ci): improve Go module caching strategy
This commit refactors the Go module caching configuration to improve efficiency and eliminate race conditions in the CI pipeline.
Key changes:
- Add
.prestage for cache preparation - Create
prepare_go_cachejob that runs first and is the only job that writes to the cache (usingpolicy: pull-push) - Update
.go-cachetemplate to usepolicy: pullso all other jobs only read from the cache - Change cache key from
${CI_JOB_NAME}to hash ofgo.sumfile, enabling cache sharing across jobs while maintaining isolation when dependencies change
Related Issues
Resolves #[issue_number]