mirror of
https://github.com/ivuorinen/actions.git
synced 2026-03-19 12:00:38 +00:00
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.
This commit is contained in:
17
Makefile
17
Makefile
@@ -1,7 +1,7 @@
|
|||||||
# Makefile for GitHub Actions repository
|
# Makefile for GitHub Actions repository
|
||||||
# Provides organized task management with parallel execution capabilities
|
# 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
|
.DEFAULT_GOAL := help
|
||||||
|
|
||||||
# Colors for output
|
# 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
|
format: format-markdown format-yaml-json format-python ## Format all files
|
||||||
@echo "$(GREEN)✅ All files formatted$(RESET)"
|
@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)"
|
@echo "$(GREEN)✅ All linting completed$(RESET)"
|
||||||
|
|
||||||
check: check-tools check-syntax check-local-refs ## Quick syntax and tool availability checks
|
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)"; \
|
echo "$(GREEN)✅ Python linting and type checking passed$(RESET)"; \
|
||||||
fi
|
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 targets
|
||||||
check-tools: ## Check if required tools are available
|
check-tools: ## Check if required tools are available
|
||||||
@echo "$(BLUE)🔧 Checking required tools...$(RESET)"
|
@echo "$(BLUE)🔧 Checking required tools...$(RESET)"
|
||||||
|
|||||||
Reference in New Issue
Block a user