Files
adobe__skills/.github/workflows/validate.yml
Lars Trieloff 88d42d0cda ci: add CODEOWNERS coverage validation to CI workflow
Agent-Id: agent-ae592f54-86cd-4f62-81a4-82dd19066249
Linked-Note-Id: 50bb8703-a92b-4c75-88bd-50ce0ada01bf
2026-04-10 11:33:52 +02:00

55 lines
1.3 KiB
YAML

name: Validate Skills
on:
push:
branches: [main]
pull_request:
branches: [main]
jobs:
validate:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- uses: actions/setup-node@v6
with:
node-version: '24'
cache: 'npm'
- run: npm ci
- run: npm run validate
codeowners-coverage:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- name: Check CODEOWNERS covers all skill directories
run: |
codeowners=".github/CODEOWNERS"
if [ ! -f "$codeowners" ]; then
echo "::error::CODEOWNERS file not found at $codeowners"
exit 1
fi
missing=()
for dir in skills/*/*/; do
# Remove trailing slash for the lookup path
path="/${dir%/}"
if ! grep -q "^${path}[/ ]" "$codeowners"; then
missing+=("$path")
fi
done
if [ ${#missing[@]} -gt 0 ]; then
echo "::error::The following skill directories are not covered in CODEOWNERS:"
for p in "${missing[@]}"; do
echo " $p"
done
exit 1
fi
echo "All skill directories are covered in CODEOWNERS."