From a79473b652e5fb9a6146caab0cf5ef1b68b468c6 Mon Sep 17 00:00:00 2001 From: CrazyMax <1951866+crazy-max@users.noreply.github.com> Date: Wed, 30 Oct 2024 08:46:18 +0100 Subject: [PATCH] dockerfile validation Signed-off-by: CrazyMax <1951866+crazy-max@users.noreply.github.com> --- docker-bake.hcl | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) 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"