Ver Fonte

ci: include go.mod in the Go cache keys

A dependency version can change in go.mod while go.sum already lists the
new version, which would keep restoring an older cache.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
jamesread há 21 horas atrás
pai
commit
843d311dd3

+ 1 - 0
.github/workflows/build-and-release.yml

@@ -100,6 +100,7 @@ jobs:
           cache: true
           # Keyed per workflow, as each builds different artifacts.
           cache-dependency-path: |
+            service/go.mod
             service/go.sum
             .github/workflows/build-and-release.yml
 

+ 1 - 0
.github/workflows/codeql-analysis.yml

@@ -60,6 +60,7 @@ jobs:
           cache: true
           # Keyed per workflow, as each builds different artifacts.
           cache-dependency-path: |
+            service/go.mod
             service/go.sum
             .github/workflows/codeql-analysis.yml
 

+ 1 - 0
.github/workflows/codestyle.yml

@@ -36,6 +36,7 @@ jobs:
           cache: true
           # Keyed per workflow, as each builds different artifacts.
           cache-dependency-path: |
+            service/go.mod
             service/go.sum
             .github/workflows/codestyle.yml
 

+ 1 - 0
.github/workflows/race.yml

@@ -32,6 +32,7 @@ jobs:
           cache: true
           # Keyed per workflow, as each builds different artifacts.
           cache-dependency-path: |
+            service/go.mod
             service/go.sum
             .github/workflows/race.yml