data(verify): promote records to verified via cross-reference #4
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: verify-status | |
| # Keep data/_verify/status.json — the synced aggregate of the verification state | |
| # (how many records are verified + Tier 0 green/yellow/red bands per category) — | |
| # current. Regenerates whenever the dataset changes and daily as a backstop, then | |
| # commits directly as TechEngineBot. The `!data/_verify/**` negation stops its own | |
| # status commit from retriggering the workflow. | |
| on: | |
| push: | |
| branches: [main] | |
| paths: | |
| - "data/**" | |
| - "!data/_verify/**" | |
| schedule: | |
| - cron: "30 5 * * *" # daily 05:30 UTC backstop | |
| workflow_dispatch: | |
| permissions: | |
| contents: write | |
| concurrency: | |
| group: verify-status | |
| cancel-in-progress: false | |
| jobs: | |
| status: | |
| runs-on: ubuntu-latest | |
| env: | |
| PYTHONIOENCODING: utf-8 | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| token: ${{ secrets.TECHAPI_TOKEN || secrets.GITHUB_TOKEN }} | |
| - uses: actions/setup-python@v5 | |
| with: | |
| python-version: "3.12" | |
| - name: Regenerate verification status aggregate | |
| run: python -m app.verify status --output data/_verify/status.json | |
| - name: Commit if changed (TechEngineBot) | |
| run: | | |
| # Stage first so a brand-new (untracked) status.json is detected too — | |
| # `git diff` alone ignores untracked files. | |
| git add data/_verify/status.json | |
| if git diff --cached --quiet; then | |
| echo "verification status unchanged"; exit 0 | |
| fi | |
| # Attribute the commit to the TechEngineBot account (id 289859915). | |
| git config user.name "TechEngineBot" | |
| git config user.email "289859915+TechEngineBot@users.noreply.github.com" | |
| git commit -m "chore(verify): refresh verification status aggregate" | |
| git push origin HEAD:main |