mirror of
https://github.com/ivuorinen/actions.git
synced 2026-03-21 01:01:15 +00:00
feat: add action-validator and clean up CI workflows (#513)
* chore(pre-commit): update hooks and add action-validator Update uv-pre-commit 0.10.9→0.10.11 and checkov 3.2.508→3.2.510. Normalize single quotes to double quotes in hook args. Add action-validator v0.8.0 hook for GitHub Actions validation. * fix(ci): clean up workflow path filters Remove non-existent action.yaml paths from action-security workflow. Fix glob patterns (**.md → **/*.md) in pr-lint workflow. Remove unused trigger paths (yarn.lock, pnpm-lock.yaml, requirements.txt, .github/labels.yml, docs/**) from security-suite and sync-labels workflows. * 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. * docs: add context-mode routing rules to CLAUDE.md Add mandatory routing rules section for context-mode MCP plugin, documenting blocked commands, redirected tools, tool selection hierarchy, and output constraints. * fix(lint): resolve action-validator failure on language-version-detect - Remove unsupported `deprecated: true` from language-version-detect/action.yml (deprecation already communicated via description field) - Scope action-validator pre-commit hook to workflow and action.yml files only - Make missing pre-commit a hard error in lint-actions target * fix(deps): update action pins and fix trivy-action version comment Update SHA-pinned action references to latest versions: - github/codeql-action v4.32.6 → v4.33.0 - nick-fields/retry v3.0.2 → v4.0.0 - actions/cache v5.0.3 → v5.0.4 - oven-sh/setup-bun v2.1.3 → v2.2.0 - softprops/action-gh-release v2.5.0 → v2.6.1 - github/issue-metrics v4.1.0 → v4.1.1 - shivammathur/setup-php 2.36.0 → 2.37.0 - astral-sh/setup-uv v7.5.0 → v7.6.0 - terraform-linters/setup-tflint v6.2.1 → v6.2.2 - aquasecurity/trivy-action: pin from master to v0.35.0 Fix pinact warning in docker-build by adding missing v prefix to trivy-action version comment (0.35.0 → v0.35.0).
This commit is contained in:
18
Makefile
18
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,20 @@ 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 "$(RED)❌ pre-commit not found. Install it via 'make install-tools' before linting$(RESET)"; \
|
||||
exit 1; \
|
||||
fi
|
||||
|
||||
# Check targets
|
||||
check-tools: ## Check if required tools are available
|
||||
@echo "$(BLUE)🔧 Checking required tools...$(RESET)"
|
||||
|
||||
Reference in New Issue
Block a user