File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11import { getOctokit , context } from '@actions/github'
22import console from 'console'
3- import { readFileSync } from 'fs'
3+ import { appendFileSync , readFileSync } from 'fs'
44import process from 'process'
55import { Item as RegressionItem , collectRegressions } from './benchmark/collect-regressions'
66import { SelfBenchmarkCategory , parseSelfBenchmarkCategory } from './benchmark/matrix'
@@ -69,6 +69,15 @@ async function main() {
6969 reportBody ,
7070 ] . join ( '\n' )
7171
72+ const stepSummaryPath = env . load ( 'GITHUB_STEP_SUMMARY' , '' )
73+ if ( stepSummaryPath ) {
74+ try {
75+ appendFileSync ( stepSummaryPath , overallReport + '\n' )
76+ } catch ( error ) {
77+ console . error ( `error: Failed to write GitHub step summary to ${ stepSummaryPath } :` , error )
78+ }
79+ }
80+
7281 const auth = env . load ( 'GITHUB_TOKEN' )
7382 const github = getOctokit ( auth ) . rest
7483
You can’t perform that action at this time.
0 commit comments