-
Notifications
You must be signed in to change notification settings - Fork 2
/
Makefile
42 lines (36 loc) · 1.02 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
34
35
36
37
38
39
40
41
42
#
# Project Makefile.
#
.DEFAULT_GOAL := help
.PHONY: help
help: ## Show this help
@echo
@echo "\033[1;94mProject Makefile\033[0m"
@echo
@echo "\033[1;93mAvailable targets:\033[0m"
@grep -h -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | sort | awk 'BEGIN {FS = ":.*?## "}; {printf " \033[36m%-25s\033[0m %s\n", $$1, $$2}'
@echo
.PHONY: lint
lint: ## Lint the project sources
docker run --rm \
--name super-linter \
--env RUN_LOCAL=true \
--env-file ".github/super-linter.env" \
--volume "$(shell pwd)":/tmp/lint \
github/super-linter:slim-v4
.PHONY: lint_shell
lint_shell: ## Open a shell in a linter container
docker run --rm -it \
--name super-linter \
--env RUN_LOCAL=true \
--env-file ".github/super-linter.env" \
--volume "$(shell pwd)":/tmp/lint \
--entrypoint /bin/bash \
--workdir /tmp/lint \
github/super-linter:slim-v4
.PHONY: fmt
fmt: ## Format the project sources
gofmt -l -s -w .
.PHONY: build_image
build_image: ## Build the Docker image
docker buildx build --tag ghcr-cleaning-action .