Skip to content

Commit

Permalink
gha: send v2 url as url_v2
Browse files Browse the repository at this point in the history
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 <tonistiigi@gmail.com>
  • Loading branch information
tonistiigi committed Feb 11, 2025
1 parent a64e628 commit 7ba4da0
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions util/buildflags/cache.go
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,6 @@ func addGithubToken(ci *controllerapi.CacheOptionsEntry) {
if v, ok := os.LookupEnv("ACTIONS_CACHE_SERVICE_V2"); ok {
if b, err := strconv.ParseBool(v); err == nil && b {
version = "2"
ci.Attrs["version"] = version
}
}
}
Expand All @@ -222,7 +221,7 @@ func addGithubToken(ci *controllerapi.CacheOptionsEntry) {
if _, ok := ci.Attrs["url"]; !ok {
if version == "2" {
if v, ok := os.LookupEnv("ACTIONS_RESULTS_URL"); ok {
ci.Attrs["url"] = v
ci.Attrs["url_v2"] = v
}
} else {
if v, ok := os.LookupEnv("ACTIONS_CACHE_URL"); ok {
Expand Down

0 comments on commit 7ba4da0

Please sign in to comment.