action-env/Makefile
Vitaliy Potyarkin a3b7e14413 Fix tag name reference in push-% recipe
Signed-off-by: Vitaliy Potyarkin <v.potyarkin@yadro.com>
2024-10-24 18:08:58 +03:00

22 lines
606 B
Makefile

PUSH?=
REGISTRY?=git.frostfs.info
REGISTRY_NAMESPACE?=truecloudlab
REGISTRY_USER?=$(REGISTRY_NAMESPACE)
REGISTRY_PASSWORD?=
IMAGE=$(REGISTRY)/$(REGISTRY_NAMESPACE)/env
TAGS=$(patsubst %/.,%,$(wildcard */.))
.PHONY: $(TAGS)
$(TAGS):
buildah images
cd $@ && buildah bud --tag $(IMAGE):$@ .
buildah images
PUSH=$(foreach tag,$(TAGS),push-$(tag))
$(PUSH):
echo -n "$$REGISTRY_PASSWORD" | wc
echo "$$REGISTRY_PASSWORD" | buildah login --username $(REGISTRY_USER) --password-stdin $(REGISTRY)
buildah push --rm $(IMAGE):$(patsubst push-%,%,$@) docker://$(IMAGE):$(patsubst push-%,%,$@)
buildah logout