forked from TrueCloudLab/action-env
23 lines
555 B
Makefile
23 lines
555 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
|
||
|
ifneq (,$(PUSH))
|
||
|
echo $$REGISTRY_PASSWORD | buildah login --username $(REGISTRY_USER) --password-stdin $(REGISTRY)
|
||
|
buildah push --rm $(IMAGE):$@ docker://$(IMAGE):$@
|
||
|
rm $(REGISTRY_AUTH_FILE)
|
||
|
|
||
|
export REGISTRY_AUTH_FILE=$(shell mktemp -u)
|
||
|
endif
|