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 .pre stage for cache preparation
  • Create prepare_go_cache job that runs first and is the only job that writes to the cache (using policy: pull-push)
  • Update .go-cache template to use policy: pull so all other jobs only read from the cache
  • Change cache key from ${CI_JOB_NAME} to hash of go.sum file, enabling cache sharing across jobs while maintaining isolation when dependencies change

Resolves #[issue_number]

How has this been tested?

Screenshots (if appropriate):

Merge request reports

Loading