2222 group : phoenix
2323 labels : gt
2424 steps :
25+ # persist-credentials: false stops actions/checkout from configuring the
26+ # default GITHUB_TOKEN as an http.extraheader, which otherwise OVERRIDES the
27+ # token embedded in the push URL below — making the push authenticate as
28+ # github-actions[bot] (which cannot bypass the require-PR rule) instead of
29+ # the CACHE_PUSH_TOKEN identity.
2530 - uses : actions/checkout@v4
26- with : { clean: false }
31+ with : { clean: false, persist-credentials: false }
2732 - name : Build + collect coverage map (SLURM)
2833 run : bash .github/scripts/submit-slurm-job.sh .github/workflows/common/coverage-refresh.sh cpu none phoenix
2934 - name : Commit refreshed map
@@ -34,10 +39,15 @@ jobs:
3439 git config user.name "mfc-bot"
3540 git config user.email "mfc-bot@users.noreply.github.com"
3641 git add tests/coverage_map.json.gz
37- git commit -m "test: refresh coverage map [skip ci]"
38- # Push to protected master via CACHE_PUSH_TOKEN (a PAT/App token with
39- # contents:write + branch-protection bypass), mirroring deploy-tap.yml's
40- # x-access-token push. The default GITHUB_TOKEN is rejected by protection.
42+ # --no-verify: this bot commit stages only the binary coverage map; it
43+ # must not run the repo pre-commit hook (./mfc.sh precheck/spelling),
44+ # which is for source changes and aborts the commit on the runner.
45+ git commit --no-verify -m "test: refresh coverage map [skip ci]"
46+ # Push to master with CACHE_PUSH_TOKEN, a classic PAT from an org-owner
47+ # account. GitHub Apps cannot bypass the require-PR ruleset rule for
48+ # direct pushes, but a PAT authenticates as the user (OrganizationAdmin),
49+ # which IS an honored bypass actor. persist-credentials:false above
50+ # ensures this token is actually used for the push.
4151 git push "https://x-access-token:${CACHE_PUSH_TOKEN}@github.com/MFlowCode/MFC.git" HEAD:master
4252 else
4353 echo "Coverage map unchanged."
0 commit comments