Merge pull request #2 from SteveBlackbeard/codex/production-hardening… #168
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Global Parity Governance | |
| on: | |
| workflow_dispatch: # Al pulsar el badge y Manual Run -> Realiza el SYNC total | |
| push: | |
| # main only. Without this the workflow also fires on the archived branches | |
| # (backup/pre-squash-v2.1.0, legacy/v4-prototype), which carry pre-rename | |
| # code that current validation can never pass. They are history snapshots, | |
| # not branches anyone maintains, so a push there produced a guaranteed red | |
| # run — and a permanently red list is a list everyone learns to ignore. | |
| branches: [ main ] | |
| paths: | |
| - 'README.md' | |
| - 'RELEASE_NOTES_MANIFEST.md' | |
| - 'assets/**' | |
| permissions: | |
| contents: write | |
| jobs: | |
| parity_logic: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout Repository | |
| uses: actions/checkout@v4 | |
| with: | |
| token: ${{ secrets.GITHUB_TOKEN }} | |
| fetch-depth: 0 | |
| ref: main | |
| - name: Set up Python | |
| uses: actions/setup-python@v5 # Actualizado para Node.js 24 | |
| with: | |
| python-version: '3.9' | |
| - name: Mode Selection (Check vs Sync) | |
| id: mode | |
| run: | | |
| if [[ "${{ github.event_name }}" == "workflow_dispatch" ]]; then | |
| echo "mode=--action-mode" >> $GITHUB_OUTPUT | |
| echo "[!] OPERATIONAL MODE: FULL SYNC" | |
| else | |
| echo "mode=--check" >> $GITHUB_OUTPUT | |
| echo "[!] OPERATIONAL MODE: DRIFT CHECK" | |
| fi | |
| - name: Execute Global Sync Engine | |
| run: python .github/scripts/sync_master.py ${{ steps.mode.outputs.mode }} | |
| - name: Commit and Push Changes | |
| run: | | |
| git config --global user.name "Ethernium Governance Guard" | |
| git config --global user.email "governance@ethernium.ai" | |
| git add . | |
| git diff-index --quiet HEAD || git commit -m "chore: Universal Parity Guard v1.9.3 [${{ github.event_name }}] 🏛️💎🦾" | |
| git push origin main |