diff --git a/.ci/podman.mk b/.ci/podman.mk index af1ce40..cca0986 100644 --- a/.ci/podman.mk +++ b/.ci/podman.mk @@ -68,7 +68,7 @@ clean: rm-test-image rm-image ## delete local built container and test images rm-remote-untagged: ## delete all remote untagged images echo "Removing all untagged images from $(IMAGE) in $(REGION)" IMAGE_IDS=$$(for image in $$(aws ecr-public describe-images --repository-name $(IMAGE) --region $(REGION) --output json | jq -r '.imageDetails[] | select(.imageTags | not ).imageDigest'); do echo -n "imageDigest=$$image "; done) ; \ - [ -n "$$IMAGE_IDS" ] && aws ecr-public batch-delete-image --repository-name $(IMAGE) --region $(REGION) --image-ids $$IMAGE_IDS || echo "No image to remove" + [ -n "$$IMAGE_IDS" ] && aws ecr-public batch-delete-image --repository-name $(IMAGE) --region $(REGION) --image-ids $$IMAGE_IDS | jq -r '.imageIds[]' || echo "No image to remove" rm-image: test -z "$$(podman image ls -q $(IMAGE):$(TAG)-$(_ARCH))" || podman image rm -f $(IMAGE):$(TAG)-$(_ARCH) > /dev/null