-
Notifications
You must be signed in to change notification settings - Fork 10
/
Makefile
30 lines (23 loc) · 1017 Bytes
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
.DEFAULT_GOAL := help
# Run GitHub Workflows with Act
###############################
.PHONY: push
run: ## Run push GitHub workflows with act
act -v push
.PHONY: clean
clean: ## Clean docker containers and volumes (causes act to break sometimes)
docker rm -f $(shell docker ps -a -q)
docker volume rm $(shell docker volume ls -q)
.PHONY: all
all: ## Cleans up docker containers, and runs GitHub workflows with act
$(MAKE) clean
$(MAKE) push
.PHONY: db-run
db-run: ## Build and run the database container with Docker. This logic is replicated from the `push.yml` workflow.
docker build -f db/Dockerfile -t ghcr.io/avinyafoundation/global-data-db:latest .
docker run -d -e MYSQL_ROOT_PASSWORD=test -p 3306:3306 ghcr.io/avinyafoundation/global-data-db:latest
# Util
#######
.PHONY: help
help: # See: https://marmelab.com/blog/2016/02/29/auto-documented-makefile.html
@grep -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | sort | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-30s\033[0m %s\n", $$1, $$2}'