Matrix Target; Invalid name; only "[a-zA-Z0-9_-]+" are allowed #3082
MalteMagnussen
started this conversation in
General
Replies: 1 comment 1 reply
Since #2649 (buildx v0.17.0) you can use the target "golang_versions" {
name = sanitize("golang_version_${SOFTWARE_VER}")
matrix = {
SOFTWARE_VER = [
"1.13",
"1.14",
"1.15",
"1.16",
"1.17",
"1.18",
"1.19",
"1.20",
"1.21",
"1.22",
"1.23",
"1.24"
]
}
} |
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Trying out HCL.
I want to build our Golang images.
I want to use a "Matrix" for the versions of Golang.
But I get
ERROR: docker-bake.hcl:12,8-25: Invalid name; only "[a-zA-Z0-9_-]+" are allowedI assume I have to use the matrix value in the name. Is there another way?
If I don't use "name" in the target "golang_versions" I get this error
Invalid name; duplicate name "golang_versions"So what do I do then? How do I create unique names for each step in the Matrix?
All reactions