Skip to content

ci: authenticate git push in benchmark README update step - #274

Merged
neuecc merged 1 commit into
mainfrom
fix-benchmark-push
Oct 28, 2026
Merged

neuecc merged 1 commit into
mainfrom
fix-benchmark-push

Conversation

@neuecc

@neuecc neuecc commented Oct 28, 2026

Copy link
Copy Markdown
Member

Summary

The Benchmark(Default) workflow has been failing at the last step, "Update README.md benchmark report link". The benchmarks themselves complete, but git push cannot authenticate:

fatal: could not read Username for 'https://github.com': No such device or address

(e.g. https://github.com/Cysharp/ZLinq/actions/runs/40667597126)

The cause is that Cysharp/Actions/.github/actions/checkout now forces persist-credentials: false (Cysharp/Actions@ecdbb35), so no token is left in the git config even though the job has contents: write. The last successful Default run (2026-04-08) predates that change.

Changes

  • Pass GH_TOKEN: ${{ github.token }} to the step and run gh auth setup-git right before git push. The shared checkout action is left as is.
  • Add -NoNewline to Set-Content. Get-Content -Raw keeps the trailing newline, so writing it back without -NoNewline added one extra newline to README.md on every run.

Notes

  • I checked locally that the README rewrite now changes only the run link line. The push itself can only be verified by running Benchmark(Default) on main after merge.
  • If main is protected by branch protection or a ruleset, pushes from github-actions[bot] may still be rejected.

🤖 Generated with Claude Code

Cysharp/Actions checkout now forces persist-credentials: false, so the
"Update README.md benchmark report link" step failed at git push with
"could not read Username". Set GH_TOKEN and run `gh auth setup-git`
before pushing.

Also pass -NoNewline to Set-Content so README.md does not gain an extra
trailing newline on every run.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@neuecc
neuecc merged commit 72bd649 into main Oct 28, 2026
10 checks passed
@neuecc
neuecc deleted the fix-benchmark-push branch October 28, 2026 11:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant