File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1- import { summary } from '@actions/core'
21import { getOctokit , context } from '@actions/github'
32import console from 'console'
4- import { readFileSync } from 'fs'
3+ import { appendFileSync , readFileSync } from 'fs'
54import process from 'process'
65import { Item as RegressionItem , collectRegressions } from './benchmark/collect-regressions'
76import { SelfBenchmarkCategory , parseSelfBenchmarkCategory } from './benchmark/matrix'
@@ -70,10 +69,13 @@ async function main() {
7069 reportBody ,
7170 ] . join ( '\n' )
7271
73- try {
74- await summary . addRaw ( overallReport , true ) . write ( )
75- } catch ( error ) {
76- console . error ( 'Failed to write GitHub step summary:' , error )
72+ const stepSummaryPath = env . load ( 'GITHUB_STEP_SUMMARY' , '' )
73+ if ( stepSummaryPath ) {
74+ try {
75+ appendFileSync ( stepSummaryPath , overallReport + '\n' )
76+ } catch ( error ) {
77+ console . error ( `Failed to write GitHub step summary to ${ stepSummaryPath } :` , error )
78+ }
7779 }
7880
7981 const auth = env . load ( 'GITHUB_TOKEN' )
You can’t perform that action at this time.
0 commit comments