-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathMakefile
33 lines (26 loc) · 1.09 KB
/
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
31
32
33
.PHONY: help
help:
@awk -F':.*##' '/^[-_a-zA-Z0-9]+:.*##/{printf"%-12s\t%s\n",$$1,$$2}' $(MAKEFILE_LIST) | sort
J_VERSION=903
.PHONY: build
build: ## Build
DOCKER_BUILDKIT=1 docker build --pull --force-rm -t "nesachirou/jlang:$(J_VERSION)" -t nesachirou/jlang:latest --build-arg BUILDKIT_INLINE_CACHE=1 --build-arg "J_VERSION=$(J_VERSION)" .
.PHONY: format
format: ## Format
npx prettier --parser yaml --write .yamllint ./.*.yaml ./*.yml .github/workflows/*.yml
.PHONY: publish
publish: ## Publish images to Docker Hub
docker push "nesachirou/jlang:$(J_VERSION)"
docker push nesachirou/jlang:latest
.PHONY: test
test: ## Test
yamllint .yamllint ./.*.yaml ./*.yml .github/workflows/*.yml
if which hadolint ; then hadolint Dockerfile ; fi
container-structure-test test --image "nesachirou/jlang:$(J_VERSION)" --config container-structure-test.yml
docker scan "nesachirou/jlang:$(J_VERSION)" || true
.PHONY: run
run: ## Run ijconsole
docker run -it -v "$(shell pwd):/data" nesachirou/jlang:latest "$(ARGS)"
.PHONY: sh
sh:
docker exec -it "$(shell docker ps -q -f'ancestor=nesachirou/jlang')" bash