review: approve 163 new plugins, exclude 10 riders, resolve 6 renames… #32
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: Refresh the downstream market file | |
| # Spec §6: a curation change must reach the downstream market immediately | |
| # after it merges — otherwise a blacklist fix would wait for the next daily | |
| # cron. This workflow rebuilds data/market.json from the stored snapshot on | |
| # every push to main that touches data/curated.json and commits it. The daily | |
| # update-catalog.yml covers the snapshot-refresh path; validate-curated.yml | |
| # covers the same generation + validation inside PRs. | |
| # | |
| # The commit here only touches data/market.json and MARKET.md (its preview | |
| # page), so it does not re-trigger this workflow (its path filter is | |
| # data/curated.json). | |
| on: | |
| push: | |
| branches: | |
| - main | |
| paths: | |
| - 'data/curated.json' | |
| workflow_dispatch: | |
| permissions: | |
| contents: write | |
| # Shared with update-catalog.yml — see the note there. Both workflows commit | |
| # generated data files to main, so they must never run at once; queueing rather | |
| # than cancelling means a curation push waits for the daily run to finish | |
| # instead of aborting it mid-crawl. | |
| concurrency: | |
| group: main-data-push | |
| cancel-in-progress: false | |
| jobs: | |
| market: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v7 | |
| - uses: actions/setup-node@v7 | |
| with: | |
| node-version: 22 | |
| - name: Rebuild data/market.json from the stored snapshot | |
| run: node scripts/market.mjs --from-snapshot | |
| - name: Validate data/market.json | |
| run: node scripts/validate-market.mjs | |
| - name: Run the market pipeline tests | |
| run: node --test scripts/test-market.mjs | |
| - name: Commit the refreshed market file | |
| run: | | |
| git config user.name "github-actions[bot]" | |
| git config user.email "41898282+github-actions[bot]@users.noreply.github.com" | |
| git add data/market.json MARKET.md | |
| if git diff --cached --quiet; then | |
| # The expected outcome whenever a curation change does not reach the | |
| # published feed: an exclusion for a repository the market already | |
| # filtered out, a category override that matched the pattern anyway, | |
| # a reworded reason. Same snapshot + same projection = same payload, | |
| # and market.mjs then keeps the previous file bit for bit (its | |
| # generated_at included), so there is genuinely nothing to publish. | |
| # Unlike the daily workflow's guard, this one fires regularly. | |
| echo "market.json is already current — this curation change does not affect the published feed." | |
| exit 0 | |
| fi | |
| git commit -m "data: rebuild market.json and its MARKET.md preview after curation change" | |
| # Same retry as update-catalog.yml: deepen the shallow clone, rebase | |
| # onto whatever landed on main since checkout, and fail loudly on a | |
| # conflict rather than letting CI guess at a merge of generated files. | |
| for attempt in 1 2 3; do | |
| if git push origin HEAD:main; then | |
| exit 0 | |
| fi | |
| echo "Push rejected (attempt $attempt) — rebasing onto origin/main." | |
| git fetch --deepen=50 origin main || git fetch origin main | |
| if ! git rebase origin/main; then | |
| git rebase --abort || true | |
| echo "Rebase onto origin/main conflicted — re-run this workflow." | |
| exit 1 | |
| fi | |
| done | |
| echo "Push still rejected after 3 attempts." | |
| exit 1 |