Skip to content

Commit 7ba4da0

Browse files
committed
gha: send v2 url as url_v2
Some repositories already have v2 enabled and that causes errors avainst older BuildKit. To avoid that we need to send both URLs as separate keys. Signed-off-by: Tonis Tiigi <[email protected]>
1 parent a64e628 commit 7ba4da0

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

util/buildflags/cache.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -210,7 +210,6 @@ func addGithubToken(ci *controllerapi.CacheOptionsEntry) {
210210
if v, ok := os.LookupEnv("ACTIONS_CACHE_SERVICE_V2"); ok {
211211
if b, err := strconv.ParseBool(v); err == nil && b {
212212
version = "2"
213-
ci.Attrs["version"] = version
214213
}
215214
}
216215
}
@@ -222,7 +221,7 @@ func addGithubToken(ci *controllerapi.CacheOptionsEntry) {
222221
if _, ok := ci.Attrs["url"]; !ok {
223222
if version == "2" {
224223
if v, ok := os.LookupEnv("ACTIONS_RESULTS_URL"); ok {
225-
ci.Attrs["url"] = v
224+
ci.Attrs["url_v2"] = v
226225
}
227226
} else {
228227
if v, ok := os.LookupEnv("ACTIONS_CACHE_URL"); ok {

0 commit comments

Comments
 (0)