chore: improve CI drift messaging and allow manual runs

This commit is contained in:
sck_0
2026-01-27 09:45:25 +01:00
parent 6326b8dba8
commit fdb9f7eae9
2 changed files with 16 additions and 3 deletions

View File

@@ -5,6 +5,7 @@ on:
branches: ["main", "feat/*"]
pull_request:
branches: ["main"]
workflow_dispatch:
jobs:
validate-and-build:
@@ -35,4 +36,15 @@ jobs:
- name: 🚨 Check for Uncommitted Drift
run: |
git diff --exit-code || (echo "❌ Detected uncommitted changes in README.md or skills_index.json. Please run scripts locally and commit." && exit 1)
if ! git diff --quiet; then
echo "❌ Detected uncommitted changes produced by registry/readme scripts."
echo
echo "To fix locally, run the FULL Validation Chain, then commit and push:"
echo " python3 scripts/validate_skills.py"
echo " python3 scripts/generate_index.py"
echo " python3 scripts/update_readme.py"
echo " git add README.md skills_index.json"
echo " git commit -m \"chore: sync generated registry files\""
echo " git push"
exit 1
fi

View File

@@ -13,9 +13,10 @@ Scripts like `scripts/generate_index.py` and `scripts/update_readme.py` modify `
**How to Fix (DO THIS EVERY TIME):**
1. Run the scripts locally to regenerate README.md and skills_index.json:
1. Run the **FULL Validation Chain** locally to regenerate `README.md` e `skills_index.json`:
```bash
python3 scripts/validate_skills.py
python3 scripts/generate_index.py
python3 scripts/update_readme.py
```
@@ -30,7 +31,7 @@ Scripts like `scripts/generate_index.py` and `scripts/update_readme.py` modify `
3. Commit and push any updates:
```bash
git add README.md skills_index.json
git commit -m "Update README and skills index to resolve CI drift"
git commit -m "chore: sync generated registry files"
git push
```