Skip to content

High-performance browser automation bridge and multi-instance orchestrator with advanced stealth injection and real-time dashboard.

chore: lint staged workflows in pre-commit

Luigi Agosti55a2a1523ea9
diff --git a/scripts/pre-commit b/scripts/pre-commit
index daad84d1..9bfe78d7 100755
--- a/scripts/pre-commit
+++ b/scripts/pre-commit
@@ -91,11 +91,30 @@ if [ -n "$staged_web" ]; then
fi
fi
+# ============================================
+# Workflow checks (actionlint)
+# ============================================
+staged_wf=$(git diff --cached --name-only --diff-filter=ACM | grep '^\.github/workflows/.*\.ya\?ml$' || true)
+if [ -n "$staged_wf" ]; then
+ echo "⚙️ Checking workflow files..."
+
+ if command -v actionlint &>/dev/null; then
+ if ! actionlint -shellcheck= $staged_wf; then
+ echo "❌ actionlint: issues found"
+ exit 1
+ fi
+ else
+ echo "⚠️ actionlint not installed, skipping (brew install actionlint)"
+ fi
+
+ echo "✅ Workflow checks passed"
+fi
+
# ============================================
# Summary
# ============================================
-if [ -z "$staged_go" ] && [ -z "$staged_web" ]; then
- echo "⏭️ No Go or dashboard files staged, skipping checks"
+if [ -z "$staged_go" ] && [ -z "$staged_web" ] && [ -z "$staged_wf" ]; then
+ echo "⏭️ No Go, dashboard, or workflow files staged, skipping checks"
fi
echo "✅ All pre-commit checks passed"