* chore: upgrade maintenance scripts to robust PyYAML parsing - Replaces fragile regex frontmatter parsing with PyYAML/yaml library - Ensures multi-line descriptions and complex characters are handled safely - Normalizes quoting and field ordering across all maintenance scripts - Updates validator to strictly enforce description quality * fix: restore and refine truncated skill descriptions - Recovered 223+ truncated descriptions from git history (6.5.0 regression) - Refined long descriptions into concise, complete sentences (<200 chars) - Added missing descriptions for brainstorming and orchestration skills - Manually fixed imagen skill description - Resolved dangling links in competitor-alternatives skill * chore: sync generated registry files and document fixes - Regenerated skills index with normalized forward-slash paths - Updated README and CATALOG to reflect restored descriptions - Documented restoration and script improvements in CHANGELOG.md * fix: restore missing skill and align metadata for full 955 count - Renamed SKILL.MD to SKILL.md in andruia-skill-smith to ensure indexing - Fixed risk level and missing section in andruia-skill-smith - Synchronized all registry files for final 955 skill count * chore(scripts): add cross-platform runners and hermetic test orchestration * fix(scripts): harden utf-8 output and clone target writeability * fix(skills): add missing date metadata for strict validation * chore(index): sync generated metadata dates * fix(catalog): normalize skill paths to prevent CI drift * chore: sync generated registry files * fix: enforce LF line endings for generated registry files
97 lines
2.8 KiB
YAML
97 lines
2.8 KiB
YAML
name: Skills Registry CI
|
|
|
|
permissions:
|
|
contents: write
|
|
|
|
on:
|
|
push:
|
|
branches: ["main", "feat/*"]
|
|
pull_request:
|
|
branches: ["main"]
|
|
workflow_dispatch:
|
|
|
|
jobs:
|
|
validate-and-build:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
|
|
- name: Set up Python
|
|
uses: actions/setup-python@v5
|
|
with:
|
|
python-version: "3.10"
|
|
|
|
- name: Install dependencies
|
|
run: |
|
|
pip install pyyaml
|
|
|
|
- name: 🔍 Validate Skills (Soft Mode)
|
|
run: |
|
|
python3 scripts/validate_skills.py
|
|
|
|
- name: 🏗️ Generate Index
|
|
run: |
|
|
python3 scripts/generate_index.py
|
|
|
|
- name: 📝 Update README
|
|
run: |
|
|
python3 scripts/update_readme.py
|
|
|
|
- name: Set up Node
|
|
uses: actions/setup-node@v4
|
|
with:
|
|
node-version: "lts/*"
|
|
|
|
- name: Install npm dependencies
|
|
run: npm ci
|
|
|
|
- name: Audit npm dependencies
|
|
run: npm audit --audit-level=high
|
|
continue-on-error: true
|
|
|
|
- name: Run tests
|
|
env:
|
|
ENABLE_NETWORK_TESTS: "1"
|
|
run: npm run test
|
|
|
|
- name: 📦 Build catalog
|
|
run: npm run catalog
|
|
|
|
- name: Set up GitHub credentials (for auto-sync)
|
|
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
|
|
run: |
|
|
git config --global user.name 'github-actions[bot]'
|
|
git config --global user.email 'github-actions[bot]@users.noreply.github.com'
|
|
git remote set-url origin https://x-access-token:${{ secrets.GITHUB_TOKEN }}@github.com/${{ github.repository }}.git
|
|
|
|
- name: Auto-commit registry drift (main only)
|
|
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
|
|
run: |
|
|
# If no changes, exit successfully
|
|
git diff --quiet && exit 0
|
|
|
|
# Pull with rebase to integrate remote changes
|
|
git pull origin main --rebase || true
|
|
|
|
git add README.md skills_index.json data/catalog.json data/bundles.json data/aliases.json CATALOG.md || true
|
|
|
|
# If nothing to commit, exit successfully
|
|
git diff --cached --quiet && exit 0
|
|
|
|
git commit -m "chore: sync generated registry files [ci skip]"
|
|
git push origin HEAD
|
|
|
|
- name: 🚨 Check for Uncommitted Drift
|
|
run: |
|
|
if ! git diff --quiet; then
|
|
echo "❌ Detected uncommitted changes produced by registry/readme/catalog scripts."
|
|
echo
|
|
echo "To fix locally, run the FULL Validation Chain, then commit and push:"
|
|
echo " npm run chain"
|
|
echo " npm run catalog"
|
|
echo " git add README.md skills_index.json data/catalog.json data/bundles.json data/aliases.json CATALOG.md"
|
|
echo " git commit -m \"chore: sync generated registry files\""
|
|
echo " git push"
|
|
exit 1
|
|
fi
|