Skip to content

Commit 95a7437

Browse files
committed
test: ✅ add workflow validation script (requires actionlint)
1 parent 3cb5ef4 commit 95a7437

1 file changed

Lines changed: 23 additions & 0 deletions

File tree

scripts/lint-workflows.sh

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
#!/bin/bash
2+
3+
# GitHub Actions Workflow Linter Script
4+
# This script lints all workflow files using actionlint
5+
6+
set -euo pipefail
7+
8+
echo "🔍 Linting GitHub Actions workflows..."
9+
10+
# Check if actionlint is installed
11+
if ! command -v actionlint &> /dev/null; then
12+
echo "❌ actionlint is not installed"
13+
echo "📦 Install with: brew install actionlint"
14+
exit 1
15+
fi
16+
17+
# Lint all workflow files
18+
if actionlint .github/workflows/*.{yml,yaml}; then
19+
echo "✅ All workflows are valid!"
20+
else
21+
echo "❌ Workflow linting failed"
22+
exit 1
23+
fi

0 commit comments

Comments
 (0)