Repository: bencherdev/bencher (language: rust)

Issue:
bug: GitHub Summary implementation does not work
The latest release 0.4.25 ‘s GitHub Summary does not work atm. Pointed out by @sagudev this is due to the `$GITHUB_STEP_SUMMARY` is actually a path to a file, so the command `echo “Summary” >> $GITHUB_STEP_SUMMARY` actually writes into the appointed file instead of that environment variable.

I can put out a tested PR to fix this as well.


Discussion / hints:
For reference, we talk about it here: https://github.com/servo/servo/pull/33261#issuecomment-2467273321

Fix patch:
diff --git a/services/cli/src/bencher/sub/project/run/ci/github_actions.rs b/services/cli/src/bencher/sub/project/run/ci/github_actions.rs
index 9339cb40b..131fc6317 100644
--- a/services/cli/src/bencher/sub/project/run/ci/github_actions.rs
+++ b/services/cli/src/bencher/sub/project/run/ci/github_actions.rs
@@ -210,7 +210,9 @@ impl GitHubActions {
     fn create_job_summary(&self, report_comment: &ReportComment) {
         let summary = report_comment.html(self.ci_only_thresholds, self.ci_id.as_deref());
         // https://docs.github.com/en/actions/writing-workflows/choosing-what-your-workflow-does/workflow-commands-for-github-actions#adding-a-job-summary
-        std::env::set_var(GITHUB_STEP_SUMMARY, summary);
+        if let Ok(file_path) = std::env::var(GITHUB_STEP_SUMMARY) {
+            let _ = std::fs::write(file_path, summary);
+        }
     }
 
     async fn create_github_check(


Test patch: