.PHONY: all prepare force-build build push

all: build

prepare:
	git submodule update --init --remote
	$(MAKE) -C JOJ3
	cp JOJ3/build/joj3 JOJ3/build/repo-health-checker bin/

force-build: prepare
	docker build --no-cache -t focs.ji.sjtu.edu.cn:5000/gitea/runner-images:focs-ubuntu-latest-slim .

build: prepare
	docker build -t focs.ji.sjtu.edu.cn:5000/gitea/runner-images:focs-ubuntu-latest-slim .

push:
	docker push focs.ji.sjtu.edu.cn:5000/gitea/runner-images:focs-ubuntu-latest-slim