File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -27,18 +27,18 @@ jobs:
2727 - name : Build + collect coverage map (SLURM)
2828 run : bash .github/scripts/submit-slurm-job.sh .github/workflows/common/coverage-refresh.sh cpu none phoenix
2929 - name : Commit refreshed map
30+ env :
31+ CACHE_PUSH_TOKEN : ${{ secrets.CACHE_PUSH_TOKEN }}
3032 run : |
3133 if ! git diff --quiet tests/coverage_map.json.gz; then
3234 git config user.name "mfc-bot"
3335 git config user.email "mfc-bot@users.noreply.github.com"
3436 git add tests/coverage_map.json.gz
3537 git commit -m "test: refresh coverage map [skip ci]"
36- # NOTE: pushing to a protected default branch requires a token or
37- # GitHub App with bypass-branch-protection permission. The default
38- # GITHUB_TOKEN may be rejected by branch protection rules; if so,
39- # configure a PAT or App token with the `contents: write` scope and
40- # pass it as `GITHUB_TOKEN` in the environment for this step.
41- git push origin HEAD:master
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.
41+ git push "https://x-access-token:${CACHE_PUSH_TOKEN}@github.com/MFlowCode/MFC.git" HEAD:master
4242 else
4343 echo "Coverage map unchanged."
4444 fi
You can’t perform that action at this time.
0 commit comments