# Load configuration
include config.mk

# Include default tasks
-include Makefiles/*.mk

# Update default tasks
mk-update:
	aws s3 sync s3://$(CI_BUCKET)/Makefiles/ Makefiles/

# Execute CI tasks
ci-test: CI_ACTIONS=$(CI_TEST)
ci-test: ci-run

ci-build: CI_ACTIONS=$(CI_BUILD)
ci-build: ci-run

ci-deploy: CI_ACTIONS=$(CI_DEPLOY)
ci-deploy: ci-run

# Run mk-update and execute make with CI actions
ci-run: mk-update
	$(MAKE) wait-docker $(CI_ACTIONS)