summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoe Carstairs <me@joeac.net>2026-07-02 09:50:13 +0100
committerJoe Carstairs <me@joeac.net>2026-07-02 09:50:13 +0100
commitcb90b728362c852f480bea25f2c9eecfad794cd1 (patch)
treee4976b87f0899964857ea07925e42266f76b46c3
parentf5a6ffa8debdd78dca80662bdd2b94206c3e00c2 (diff)
only pushes if is own image
-rw-r--r--make/container.mk5
1 files changed, 3 insertions, 2 deletions
diff --git a/make/container.mk b/make/container.mk
index f11596d..a9758ff 100644
--- a/make/container.mk
+++ b/make/container.mk
@@ -8,6 +8,7 @@ REGISTRY_USER := joeac
container_image_name = $(shell $(COMPOSE_CMD) config | yq ".services.$(module).image")
is_containerised = $(filter $(COMPOSE_SERVICES),$(module))
+is_own_image = $(filter git.joeac.net/%,$(container_image_name))
has_dockerfile = $(shell test -f $(module).Dockerfile)
define build_module_rule =
@@ -20,8 +21,8 @@ endef
define push_module_rule =
.PHONY: push_$(module)
push_$(module): $(if $(is_containerised),login_registry)
- $(if $(is_containerised),\
- podman push $(container_image_name))
+ $(if $(is_containerised),$(if $(is_own_image),\
+ podman push $(container_image_name)))
endef
$(foreach module,$(MODULES),$(eval $(call build_module_rule)))