mirror of https://github.com/docker/buildx.git
				
				
				
			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 <tonistiigi@gmail.com>
This commit is contained in:
		
							parent
							
								
									a64e628774
								
							
						
					
					
						commit
						7ba4da0800
					
				|  | @ -210,7 +210,6 @@ func addGithubToken(ci *controllerapi.CacheOptionsEntry) { | ||||||
| 		if v, ok := os.LookupEnv("ACTIONS_CACHE_SERVICE_V2"); ok { | 		if v, ok := os.LookupEnv("ACTIONS_CACHE_SERVICE_V2"); ok { | ||||||
| 			if b, err := strconv.ParseBool(v); err == nil && b { | 			if b, err := strconv.ParseBool(v); err == nil && b { | ||||||
| 				version = "2" | 				version = "2" | ||||||
| 				ci.Attrs["version"] = version |  | ||||||
| 			} | 			} | ||||||
| 		} | 		} | ||||||
| 	} | 	} | ||||||
|  | @ -222,7 +221,7 @@ func addGithubToken(ci *controllerapi.CacheOptionsEntry) { | ||||||
| 	if _, ok := ci.Attrs["url"]; !ok { | 	if _, ok := ci.Attrs["url"]; !ok { | ||||||
| 		if version == "2" { | 		if version == "2" { | ||||||
| 			if v, ok := os.LookupEnv("ACTIONS_RESULTS_URL"); ok { | 			if v, ok := os.LookupEnv("ACTIONS_RESULTS_URL"); ok { | ||||||
| 				ci.Attrs["url"] = v | 				ci.Attrs["url_v2"] = v | ||||||
| 			} | 			} | ||||||
| 		} else { | 		} else { | ||||||
| 			if v, ok := os.LookupEnv("ACTIONS_CACHE_URL"); ok { | 			if v, ok := os.LookupEnv("ACTIONS_CACHE_URL"); ok { | ||||||
|  |  | ||||||
		Loading…
	
		Reference in New Issue