Skip to content

Commit ebedd57

Browse files
author
1bcMax
committed
chore: brand-sync workflow + refresh brand numbers
The vendored sync script's --check is offline by design, so nothing ever re-fetched the canonical artifact — numbers rotted behind green CI. This adds the freshness half: a weekly workflow running --refresh (direct push, PR fallback on protected branches), and lands today's refresh: brand-numbers: already up to date (1 keys in use)
1 parent 374e5c9 commit ebedd57

2 files changed

Lines changed: 58 additions & 7 deletions

File tree

‎.github/workflows/brand-sync.yml‎

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
# Vendored into every repo listed in blockrun's brand/consumers.json — the
2+
# fan-out half of the brand-numbers system. The vendored sync script keeps PR
3+
# CI deterministic and offline (--check never fetches); THIS workflow is where
4+
# freshness comes from: it re-fetches the canonical artifact weekly and lands
5+
# the marker rewrites, so numbers can't silently rot behind green CI again
6+
# (they did: 14 of 15 consumers sat stale, one 70→71 sweep touched 8 files in
7+
# this repo alone).
8+
#
9+
# Direct push to the default branch on purpose: these are docs/marker rewrites
10+
# generated from blockrun.ai/brand/numbers.json by the audited script in
11+
# scripts/. A PR queue nobody tends is how the staleness happened. If the
12+
# branch is protected the push fails and the fallback opens a PR instead.
13+
# No third-party actions beyond actions/checkout — supply-chain surface stays
14+
# at one GitHub-owned action.
15+
name: brand-sync
16+
on:
17+
schedule:
18+
- cron: "17 6 * * 1" # Mondays 06:17 UTC, offset from the top-of-hour crunch
19+
workflow_dispatch:
20+
permissions:
21+
contents: write
22+
pull-requests: write
23+
jobs:
24+
sync:
25+
runs-on: ubuntu-latest
26+
steps:
27+
- uses: actions/checkout@v4
28+
- name: Refresh brand numbers from the canonical artifact
29+
run: node scripts/sync-brand-numbers.mjs --refresh
30+
- name: Land the rewrite
31+
env:
32+
GH_TOKEN: ${{ github.token }}
33+
run: |
34+
if git diff --quiet; then
35+
echo "already in sync"
36+
exit 0
37+
fi
38+
git config user.name "github-actions[bot]"
39+
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
40+
git add -A
41+
git commit -m "chore: sync brand numbers from blockrun.ai/brand/numbers.json"
42+
if git push origin "HEAD:${GITHUB_REF_NAME}"; then
43+
echo "pushed to ${GITHUB_REF_NAME}"
44+
else
45+
BR="brand-sync/$(date +%Y%m%d)"
46+
git push -f origin "HEAD:${BR}"
47+
gh pr create --head "$BR" \
48+
--title "chore: sync brand numbers" \
49+
--body "Automated marker refresh from https://blockrun.ai/brand/numbers.json (scripts/sync-brand-numbers.mjs --refresh). Opened as a PR because the default branch is protected." \
50+
|| echo "PR creation unavailable — branch ${BR} pushed, needs manual PR"
51+
fi

‎brand-numbers.json‎

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,22 +3,22 @@
33
"version": 1,
44
"models": {
55
"chatVisible": 71,
6-
"totalVisible": 93,
7-
"free": 6,
8-
"freeWithheld": 19,
6+
"totalVisible": 95,
7+
"free": 5,
8+
"freeWithheld": 20,
99
"image": 9,
10-
"video": 6,
10+
"video": 8,
1111
"music": 1,
1212
"speech": 5,
1313
"soundfx": 1,
14-
"withFallback": 46,
15-
"withFallbackAllEntries": 79
14+
"withFallback": 44,
15+
"withFallbackAllEntries": 78
1616
},
1717
"clawrouter": {
1818
"dimensions": 15,
1919
"tiers": 4,
2020
"profiles": 4,
21-
"aliases": 202
21+
"aliases": 229
2222
},
2323
"mcp": {
2424
"tools": 20

0 commit comments

Comments
 (0)