history: use built-in build-arg to override the build name

Signed-off-by: CrazyMax <1951866+crazy-max@users.noreply.github.com>
This commit is contained in:
CrazyMax
2025-07-22 14:34:36 +02:00
parent 3f4bf829d8
commit 7e11d3601e
2 changed files with 44 additions and 0 deletions
+4
View File
@@ -26,6 +26,10 @@ import (
const recordsLimit = 50
func buildName(fattrs map[string]string, ls *localstate.State) string {
if v, ok := fattrs["build-arg:BUILDKIT_BUILD_NAME"]; ok && v != "" {
return v
}
var res string
var target, contextPath, dockerfilePath, vcsSource string