-
-
Notifications
You must be signed in to change notification settings - Fork 11
65 lines (54 loc) · 1.7 KB
/
validate-skills.yml
File metadata and controls
65 lines (54 loc) · 1.7 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
name: Validate Skills
on:
pull_request:
branches: ["**"]
types: [opened, synchronize, reopened, ready_for_review]
paths:
- "skills/**"
- "packages/**/skills/**"
- "apps/**/skills/**"
- "configs/**/skills/**"
- ".github/workflows/validate-skills.yml"
- ".github/actions/setup-vp/**"
- "package.json"
- "pnpm-lock.yaml"
- "pnpm-workspace.yaml"
workflow_dispatch:
permissions:
contents: read
concurrency:
group: intent-validate-skills-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
jobs:
validate:
name: Validate skill files
runs-on: ubuntu-latest
if: github.event_name == 'workflow_dispatch' || github.event.pull_request.draft == false
steps:
- name: Checkout
uses: actions/checkout@v6
- name: Setup Vite+
uses: ./.github/actions/setup-vp
- name: Find and validate skills
run: |
set -euo pipefail
declare -a skill_roots=()
if [ -d "skills" ]; then
skill_roots+=("skills")
fi
while IFS= read -r dir; do
skill_roots+=("$dir")
done < <(find packages apps configs -path "*/skills" -type d 2>/dev/null | sort -u)
if [ ${#skill_roots[@]} -eq 0 ]; then
echo "No skills/ directory found — skipping validation."
exit 0
fi
for dir in "${skill_roots[@]}"; do
echo "Validating ${dir}..."
parent_dir="$(dirname "$dir")"
skills_dir_name="$(basename "$dir")"
(
cd "$parent_dir"
vp dlx @tanstack/intent validate "$skills_dir_name"
)
done