File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 8888 # are comparable to Hardhat's own regression baselines.
8989 runs-on : hardhat-linux-amd64-self-hosted
9090 timeout-minutes : 180
91+ permissions :
92+ # Lets the short-lived GITHUB_TOKEN used on non-baseline runs read commit
93+ # metadata via the REST API (see "Store benchmark result").
94+ contents : read
9195 env :
9296 # Hardhat is checked out into ./hardhat; the EDR repo is the workspace root.
9397 HH : ${{ github.workspace }}/hardhat
@@ -330,7 +334,12 @@ jobs:
330334 gh-repository : github.com/nomic-foundation-automation/edr-benchmark-results
331335 gh-pages-branch : main
332336 benchmark-data-dir-path : hardhat3
333- github-token : ${{ secrets.BENCHMARK_GITHUB_TOKEN }}
337+ # Baseline (main push) runs push to the external results repo, which
338+ # needs the cross-repo PAT. Non-baseline runs (PR/dispatch and the
339+ # `/bench` issue_comment path) never push — the token is only used to
340+ # read commit metadata and to clone the (public) results repo for
341+ # comparison — so use the short-lived GITHUB_TOKEN.
342+ github-token : ${{ needs.setup.outputs.is_baseline == 'true' && secrets.BENCHMARK_GITHUB_TOKEN || secrets.GITHUB_TOKEN }}
334343 # Only push a new baseline on main-branch pushes; PRs/dispatch only compare.
335344 auto-push : ${{ needs.setup.outputs.is_baseline == 'true' }}
336345 alert-threshold : " 110%"
You can’t perform that action at this time.
0 commit comments