chore: improve CI drift messaging and allow manual runs
This commit is contained in:
14
.github/workflows/ci.yml
vendored
14
.github/workflows/ci.yml
vendored
@@ -5,6 +5,7 @@ on:
|
|||||||
branches: ["main", "feat/*"]
|
branches: ["main", "feat/*"]
|
||||||
pull_request:
|
pull_request:
|
||||||
branches: ["main"]
|
branches: ["main"]
|
||||||
|
workflow_dispatch:
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
validate-and-build:
|
validate-and-build:
|
||||||
@@ -35,4 +36,15 @@ jobs:
|
|||||||
|
|
||||||
- name: 🚨 Check for Uncommitted Drift
|
- name: 🚨 Check for Uncommitted Drift
|
||||||
run: |
|
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
|
||||||
|
|||||||
@@ -13,9 +13,10 @@ Scripts like `scripts/generate_index.py` and `scripts/update_readme.py` modify `
|
|||||||
|
|
||||||
**How to Fix (DO THIS EVERY TIME):**
|
**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
|
```bash
|
||||||
|
python3 scripts/validate_skills.py
|
||||||
python3 scripts/generate_index.py
|
python3 scripts/generate_index.py
|
||||||
python3 scripts/update_readme.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:
|
3. Commit and push any updates:
|
||||||
```bash
|
```bash
|
||||||
git add README.md skills_index.json
|
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
|
git push
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user