diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 4ae1b947..962e8cf4 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -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 diff --git a/docs/CI_DRIFT_FIX.md b/docs/CI_DRIFT_FIX.md index 41eeb941..2f46b9ab 100644 --- a/docs/CI_DRIFT_FIX.md +++ b/docs/CI_DRIFT_FIX.md @@ -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 ```