From 43c5ba923f833aa352cbb845b079b6a890d95f54 Mon Sep 17 00:00:00 2001 From: You-Sheng Yang Date: Tue, 25 Apr 2023 03:15:48 +0800 Subject: [PATCH] make: skip --disable-content-trust at docker buildx (#139) `docker build` may be aliased as `docker buildx build`, which doesn't support --disable-content-trust switch. Signed-off-by: You-Sheng Yang Reviewed-on: https://gitea.com/gitea/act_runner/pulls/139 Reviewed-by: techknowlogick Co-authored-by: You-Sheng Yang Co-committed-by: You-Sheng Yang --- Makefile | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 9bae70d..a72fdeb 100644 --- a/Makefile +++ b/Makefile @@ -162,7 +162,10 @@ release-compress: | $(DIST_DIRS) .PHONY: docker docker: - docker build --disable-content-trust=false -t $(DOCKER_REF) . + if ! docker buildx version >/dev/null 2>&1; then \ + ARG_DISABLE_CONTENT_TRUST=--disable-content-trust=false; \ + fi; \ + docker build $${ARG_DISABLE_CONTENT_TRUST} -t $(DOCKER_REF) . clean: $(GO) clean -x -i ./...