From 49ea8c8779fc5939576f80b9a2e25485b10d9cba Mon Sep 17 00:00:00 2001 From: Stefan Reimer Date: Mon, 16 May 2022 17:54:40 +0200 Subject: [PATCH] feat: Add support for custom EXTRA_TAGS --- podman.mk | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/podman.mk b/podman.mk index 95c2fc7..5e3de0b 100644 --- a/podman.mk +++ b/podman.mk @@ -12,7 +12,6 @@ endif all: test - build: @docker image exists $(REGISTRY)/$(IMAGE):$(TAG) || \ docker build --rm -t $(REGISTRY)/$(IMAGE):$(TAG) --build-arg TAG=$(TAG) . @@ -29,9 +28,7 @@ scan: build push: build @aws ecr-public get-login-password --region $(REGION) | docker login --username AWS --password-stdin $(REGISTRY) - @docker tag $(IMAGE):$(TAG) $(REGISTRY)/$(IMAGE):$(TAG) $(REGISTRY)/$(IMAGE):latest - docker push $(REGISTRY)/$(IMAGE):$(TAG) - docker push $(REGISTRY)/$(IMAGE):latest + @for t in $(TAG) latest $(EXTRA_TAGS); do echo "tag and push: $$t"; docker tag $(IMAGE):$(TAG) $(REGISTRY)/$(IMAGE):$$t && docker push $(REGISTRY)/$(IMAGE):$$t; done clean: rm-test-image rm-image