Commit cc52ae2
authored
Build: Post bench reports as Semantic Performance Bot (#147)
* Build: Post bench reports as Semantic Performance Bot
Swap the comment job and the history-archive job from `GITHUB_TOKEN` to
an installation token minted via `actions/create-github-app-token@v1`,
driven by the two secrets already set up in repo settings:
- SEMANTIC_PERF_BOT_APP_ID
- SEMANTIC_PERF_BOT_PRIVATE_KEY
Same permission surface as before — Pull requests (write), Contents
(write), Actions (read). Branded identity, not widened scope.
Effect downstream:
- PR bench comments post as the bot with its uploaded SUI-themed avatar
instead of the generic `github-actions[bot]` face.
- Archival commits on main are authored by the bot, so git blame /
history listings clearly show which chunk of main was machine-
authored bench bookkeeping vs. developer work.
Commit-author fields on the archive step use the
`<app-id>+<app-slug>[bot]@users.noreply.github.com` format. Slug
assumed to be `semantic-performance-bot` — if the app was registered
under a different slug, that's a one-line fix in this file. GitHub
still attributes the commit to the app regardless, the slug just
affects the display email and avatar linkage.
Also bundles `docs/public/images/{heap,performance}-avatar.png` staged
alongside — the avatar assets land with the workflow change that uses
them.
Acceptance test: next PR that touches `packages/**` after this merges
posts its bench comment under the bot's identity. One-commit revert
restores `GITHUB_TOKEN` if anything's off.
* Build: Tighten bench path filter — tools/bench-reporter in, report yml out
Two corrections to the pull_request path filter now that we've exercised
the workflow enough to see the gaps:
- Add `tools/bench-reporter/**`. A PR that modifies only reporter.js or
append-history.js previously didn't trigger benchmarks, yet those
scripts run from the PR-head checkout when the report workflow fires,
so the change DOES take effect on the PR's own comment. Missed coverage.
- Drop `.github/workflows/benchmarks-report.yml`. This workflow file is
the `workflow_run` handler — GitHub runs it from main's copy, not the
PR's, which means a PR that modifies only this file cannot validate
its own change inline anyway. Triggering benchmarks on such a PR
wastes ~10 min of CI without producing actionable signal.
`benchmarks.yml` itself stays in the filter — it's the `pull_request`
entry point and GitHub runs it from PR-head YAML, so self-validation
works.1 parent 19f8e6f commit cc52ae2
4 files changed
Lines changed: 47 additions & 6 deletions
File tree
- .github/workflows
- docs/public/images
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
23 | 23 | | |
24 | 24 | | |
25 | 25 | | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
26 | 37 | | |
27 | 38 | | |
28 | 39 | | |
| |||
43 | 54 | | |
44 | 55 | | |
45 | 56 | | |
| 57 | + | |
46 | 58 | | |
47 | 59 | | |
48 | 60 | | |
| |||
52 | 64 | | |
53 | 65 | | |
54 | 66 | | |
55 | | - | |
| 67 | + | |
56 | 68 | | |
57 | 69 | | |
58 | 70 | | |
| |||
89 | 101 | | |
90 | 102 | | |
91 | 103 | | |
92 | | - | |
| 104 | + | |
93 | 105 | | |
94 | 106 | | |
95 | 107 | | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
96 | 111 | | |
97 | 112 | | |
98 | 113 | | |
| |||
115 | 130 | | |
116 | 131 | | |
117 | 132 | | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
118 | 142 | | |
119 | 143 | | |
120 | 144 | | |
121 | 145 | | |
122 | 146 | | |
123 | 147 | | |
124 | 148 | | |
125 | | - | |
| 149 | + | |
126 | 150 | | |
127 | 151 | | |
128 | 152 | | |
| |||
131 | 155 | | |
132 | 156 | | |
133 | 157 | | |
| 158 | + | |
134 | 159 | | |
135 | 160 | | |
136 | 161 | | |
| |||
155 | 180 | | |
156 | 181 | | |
157 | 182 | | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
158 | 187 | | |
159 | | - | |
160 | | - | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
161 | 193 | | |
162 | 194 | | |
163 | 195 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
| 6 | + | |
6 | 7 | | |
| 8 | + | |
| 9 | + | |
7 | 10 | | |
8 | | - | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
9 | 18 | | |
10 | 19 | | |
11 | 20 | | |
| |||
Loading
Loading
0 commit comments