From 20b058b2213f84dffaf4afe17f41c037ca5804e7 Mon Sep 17 00:00:00 2001 From: Dreaded_X Date: Tue, 23 Dec 2025 03:35:44 +0100 Subject: [PATCH] feat: Cache docker builds --- docker-bake.hcl | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/docker-bake.hcl b/docker-bake.hcl index eb12894..fe1ab9e 100644 --- a/docker-bake.hcl +++ b/docker-bake.hcl @@ -6,9 +6,23 @@ group "default" { } target "docker-metadata-action" {} +target "cache" { + cache-from = [ + { + type = "gha", + } + ] + + cache-to = [ + { + type = "gha", + mode = "max" + } + ] +} target "lldap-controller" { - inherits = ["docker-metadata-action"] + inherits = ["docker-metadata-action", "cache"] context = "./" dockerfile = "Dockerfile" tags = [for tag in target.docker-metadata-action.tags : "${TAG_BASE}:${tag}"] @@ -16,6 +30,7 @@ target "lldap-controller" { } target "manifests" { + inherits = ["cache"] context = "./" dockerfile = "Dockerfile" target = "manifests"