Skip to content

ci: publish benchmarks to GH pages#125

Draft
austinvazquez wants to merge 1 commit intocontainerd:mainfrom
austinvazquez:publish-benchmarks-to-ghpages
Draft

ci: publish benchmarks to GH pages#125
austinvazquez wants to merge 1 commit intocontainerd:mainfrom
austinvazquez:publish-benchmarks-to-ghpages

Conversation

@austinvazquez
Copy link
Member

No description provided.

Copilot AI review requested due to automatic review settings March 19, 2026 20:22
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Updates the benchmarks GitHub Actions workflow to persist and publish benchmark results (intended for GitHub Pages/gh-pages) instead of only printing them in the step summary.

Changes:

  • Elevates workflow token permissions to allow writing repository contents (and deployments).
  • Adds benchmark-action/github-action-benchmark to store Go benchmark results under a per-arch directory.
  • Adds a manual git push step intended to publish results to the gh-pages branch.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

permissions:
contents: read
contents: write
deployments: write
Copy link

Copilot AI Mar 19, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

deployments: write permission is granted but nothing in this workflow uses the Deployments API (only contents is needed for pushing to a branch). Please remove this permission to follow least-privilege and reduce token scope.

Suggested change
deployments: write

Copilot uses AI. Check for mistakes.
name: 'Nerdbox Benchmarks'
tool: 'go'
benchmark-data-dir-path: "data/benchmarks/linux/${{ matrix.arch }}"
output-file-path: 'benchmark.json'
Copy link

Copilot AI Mar 19, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

output-file-path is set to benchmark.json, but this workflow only creates /tmp/bench-output.txt from the go test run. github-action-benchmark will fail (or parse nothing) unless the path points to an existing benchmark output file. Point output-file-path at the file you generate (e.g., /tmp/bench-output.txt), or add a step that actually produces benchmark.json in the expected format.

Suggested change
output-file-path: 'benchmark.json'
output-file-path: '/tmp/bench-output.txt'

Copilot uses AI. Check for mistakes.
Comment on lines +144 to +146

- name: Push benchmark result
run: git push 'https://github.com/containerd/nerdbox.git' ghpages:gh-pages
Copy link

Copilot AI Mar 19, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This push command is very likely to fail: (1) ghpages is not a ref created anywhere in this job, so git push … ghpages:gh-pages will error unless that branch exists locally; and (2) pushing to a raw https://github.com/... remote won’t use the actions/checkout injected credentials, so it will be unauthenticated. Prefer pushing to origin (with checkout credentials) and push the ref that actually exists (e.g., git push origin HEAD:gh-pages), or enable the benchmark action’s built-in push/gh-pages options and drop the manual git push step.

Suggested change
- name: Push benchmark result
run: git push 'https://github.com/containerd/nerdbox.git' ghpages:gh-pages
auto-push: true
gh-pages-branch: gh-pages

Copilot uses AI. Check for mistakes.
Signed-off-by: Austin Vazquez <austin.vazquez@docker.com>
@austinvazquez austinvazquez force-pushed the publish-benchmarks-to-ghpages branch from 8786def to eb6cab6 Compare March 19, 2026 23:54
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.

3 participants