From 5a8f0e7bf9413b7d42da6b2fdfb4746f8d5e1f99 Mon Sep 17 00:00:00 2001 From: lotyp Date: Sun, 14 Apr 2024 14:51:03 +0300 Subject: [PATCH] feat: switch to rhysd/actionlint action linter --- Makefile | 27 ++++++++------------------- package.json | 6 +----- 2 files changed, 9 insertions(+), 24 deletions(-) diff --git a/Makefile b/Makefile index 454df70..e2407ac 100644 --- a/Makefile +++ b/Makefile @@ -1,6 +1,7 @@ NPM_BIN ?= pnpm NPM_RUNNER ?= $(NPM_BIN) +# # Self documenting Makefile code # ------------------------------------------------------------------------------------ ifneq ($(TERM),) @@ -24,7 +25,7 @@ else WHITE := "" RST := "" endif -MAKE_LOGFILE = /tmp/gh-actions.log +MAKE_LOGFILE = /tmp/wayofdev-gh-actions.log MAKE_CMD_COLOR := $(BLUE) default: all @@ -44,32 +45,16 @@ help: ## Show this menu @echo ' 🏢 ${YELLOW}Org wayofdev (github.com/wayofdev)${RST}' .PHONY: help +# # Default action # Defines default command when `make` is executed without additional parameters # ------------------------------------------------------------------------------------ all: help .PHONY: all - +# # System Actions # ------------------------------------------------------------------------------------ -i: ## Install dependencies - $(NPM_RUNNER) i -.PHONY: i - -install: i ## Same as `make i` -.PHONY: install - -validate: ## Validate all github action files - @echo "Validating github actions..." - action-validator .github/workflows/apply-labels.yml - action-validator .github/workflows/auto-merge-release.yml - action-validator .github/workflows/build-image.yml - action-validator .github/workflows/create-arch-diagram.yml - action-validator .github/workflows/create-release.yml - action-validator .github/workflows/shellcheck.yml -.PHONY: validate - hooks: ## Install git hooks from pre-commit-config pre-commit install pre-commit autoupdate @@ -79,6 +64,10 @@ lint-yaml: ## Lint all yaml files yamllint . .PHONY: lint-yaml +lint-actions: ## Lint all github actions + docker run --rm -v $(shell pwd):/repo --workdir /repo rhysd/actionlint:latest -color +.PHONY: lint-actions + # # Release # ------------------------------------------------------------------------------------ diff --git a/package.json b/package.json index 6317bc5..ce5b614 100644 --- a/package.json +++ b/package.json @@ -1,9 +1,5 @@ { "name": "gh-actions", "version": "2.0.0", - "private": true, - "dependencies": { - "@action-validator/core": "0.6.0", - "@action-validator/cli": "0.6.0" - } + "private": true }