diff --git a/docker-bake.hcl b/docker-bake.hcl index bb4b1d0b..184b6c4a 100644 --- a/docker-bake.hcl +++ b/docker-bake.hcl @@ -21,7 +21,7 @@ group "pre-checkin" { } group "validate" { - targets = ["lint", "vendor-validate", "license-validate"] + targets = ["lint", "vendor-validate", "dockerfile-validate", "license-validate"] } target "build" { @@ -54,6 +54,18 @@ target "vendor-validate" { output = ["type=cacheonly"] } +target "dockerfile-validate" { + matrix = { + dockerfile = [ + "dev.Dockerfile", + "./hack/dockerfiles/license.Dockerfile" + ] + } + name = "dockerfile-validate-${md5(dockerfile)}" + dockerfile = dockerfile + call = "check" +} + target "test" { dockerfile = "dev.Dockerfile" target = "test"