Prepare for v0.0.11 release (#520)

This commit is contained in:
Ramon Quitales
2025-04-11 14:19:58 -07:00
committed by GitHub
parent f83b7a0a44
commit 4d858c52b9
2 changed files with 7 additions and 5 deletions

View File

@@ -1,5 +1,7 @@
## Unreleased ## Unreleased
## 0.0.11 (2025-04-11)
### Added ### Added
- Multiple exports are now allowed if the build daemon is detected to have - Multiple exports are now allowed if the build daemon is detected to have

View File

@@ -474,21 +474,21 @@ func (c CacheFrom) validate(preview bool) (*controllerapi.CacheOptionsEntry, err
} }
pb := parsed[0].ToPB() pb := parsed[0].ToPB()
if !containsGithubToken(pb) { if !isActive(pb) {
pb = nil pb = nil
} }
return pb, nil return pb, nil
} }
// containsGithubToken checks if the GitHub token is set in the cache entry. // isActive checks if the GitHub token is set in the cache entry.
// If it is not a GHA cache entry, it will return true. // If it is not a GHA cache entry, it will return true.
// This is to maintain backwards compatibility with the old buildx behaviour. // This is to maintain backwards compatibility with the old buildx behaviour.
func containsGithubToken(ci *controllerapi.CacheOptionsEntry) bool { func isActive(ci *controllerapi.CacheOptionsEntry) bool {
if ci.Type != "gha" { if ci.Type != "gha" {
return true return true
} }
return ci.Attrs["token"] != "" && ci.Attrs["url"] != "" return ci.Attrs["token"] != "" && (ci.Attrs["url"] != "" || ci.Attrs["url_v2"] != "")
} }
// CacheToInline embeds cache information directly into an image. // CacheToInline embeds cache information directly into an image.
@@ -698,7 +698,7 @@ func (c CacheTo) validate(preview bool) (*controllerapi.CacheOptionsEntry, error
} }
pb := parsed[0].ToPB() pb := parsed[0].ToPB()
if !containsGithubToken(pb) { if !isActive(pb) {
pb = nil pb = nil
} }