From de177c57b807a520f96f503d414d49005c0d8bd0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Niccol=C3=B2=20Fei?= Date: Thu, 25 Jun 2026 13:01:55 +0200 Subject: [PATCH] fix: set output to cacheonly when running bake --check MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Niccolò Fei --- Taskfile.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Taskfile.yml b/Taskfile.yml index d4137dc..01a73b5 100644 --- a/Taskfile.yml +++ b/Taskfile.yml @@ -56,7 +56,10 @@ tasks: msg: 'Not a valid target, metadata.hcl file is missing. Target: {{.TARGET}}' cmds: - echo -e "{{.BLUE}}Checking target {{.TARGET}}...{{.NC}}" - - docker buildx bake -f {{.TARGET}}/metadata.hcl -f docker-bake.hcl --check + # --check builds a single platform, which conflicts with the index-level + # OCI annotations in docker-bake.hcl. Override the output to cacheonly so + # the check only lints the build without exporting an image. + - docker buildx bake -f {{.TARGET}}/metadata.hcl -f docker-bake.hcl --check --set "*.output=type=cacheonly" requires: vars: - name: TARGET