From ab30811198fcc243413b27fe530eaeaff362516c Mon Sep 17 00:00:00 2001 From: Ismo Vuorinen Date: Wed, 18 Mar 2026 19:39:56 +0200 Subject: [PATCH] feat(make): add lint-actions target for action-validator Add lint-actions target that runs action-validator via pre-commit. Include it in the lint dependency list and .PHONY declaration. --- Makefile | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index 28bb121..f3ec288 100644 --- a/Makefile +++ b/Makefile @@ -1,7 +1,7 @@ # Makefile for GitHub Actions repository # Provides organized task management with parallel execution capabilities -.PHONY: help all docs update-catalog lint format check clean install-tools test test-unit test-integration test-coverage generate-tests generate-tests-dry test-generate-tests docker-build docker-push docker-test docker-login docker-all release release-dry release-prep release-tag release-undo update-version-refs bump-major-version check-version-refs +.PHONY: help all docs update-catalog lint format check clean install-tools test test-unit test-integration test-coverage generate-tests generate-tests-dry test-generate-tests docker-build docker-push docker-test docker-login docker-all release release-dry release-prep release-tag release-undo update-version-refs bump-major-version check-version-refs lint-actions .DEFAULT_GOAL := help # Colors for output @@ -98,7 +98,7 @@ update-validators-dry: ## Preview validation rules changes (dry run) format: format-markdown format-yaml-json format-python ## Format all files @echo "$(GREEN)✅ All files formatted$(RESET)" -lint: lint-markdown lint-yaml lint-shell lint-python ## Run all linters +lint: lint-markdown lint-yaml lint-shell lint-python lint-actions ## Run all linters @echo "$(GREEN)✅ All linting completed$(RESET)" check: check-tools check-syntax check-local-refs ## Quick syntax and tool availability checks @@ -322,6 +322,19 @@ lint-python: ## Lint Python files with ruff and pyright echo "$(GREEN)✅ Python linting and type checking passed$(RESET)"; \ fi +lint-actions: ## Validate GitHub Actions workflows and action.yml files + @echo "$(BLUE)🔍 Validating GitHub Actions...$(RESET)" + @if command -v pre-commit >/dev/null 2>&1; then \ + if PRE_COMMIT_USE_UV=1 pre-commit run action-validator --all-files; then \ + echo "$(GREEN)✅ Actions validation passed$(RESET)"; \ + else \ + echo "$(RED)❌ Actions validation failed$(RESET)" | tee -a $(LOG_FILE); \ + exit 1; \ + fi; \ + else \ + echo "$(YELLOW)⚠️ pre-commit not found, skipping action-validator$(RESET)"; \ + fi + # Check targets check-tools: ## Check if required tools are available @echo "$(BLUE)🔧 Checking required tools...$(RESET)"