@@ -9,6 +9,9 @@ if (!process.env.GITHUB_REF?.startsWith("refs/pull/")) {
99const [ owner , repo ] = process . env . GITHUB_REPOSITORY ?. split ( "/" ) ! ;
1010const pull_request_number = parseInt ( process . env . GITHUB_REF ?. split ( "/" ) [ 2 ] ! ) ;
1111
12+ const job_regex = process . env . INPUT_JOB_REGEX ! ;
13+ const step_regex = process . env . INPUT_STEP_REGEX ! ;
14+
1215const appId = 1230093 ;
1316const privateKey = process . env . INPUT_PRIVATE_KEY ! ;
1417
@@ -71,7 +74,7 @@ for (const file of readdirRecursively(".")) {
7174 const step = job . steps ! [ i ] ;
7275 console . log ( i , step ) ;
7376 if (
74- step . name . toLowerCase ( ) . match ( / b u i l d ( \( . + \) ) ? / ) &&
77+ step . name . toLowerCase ( ) . match ( step_regex ) &&
7578 step . status === "completed" &&
7679 step . conclusion === "success"
7780 ) {
@@ -86,34 +89,16 @@ for (const file of readdirRecursively(".")) {
8689
8790 console . log ( `job name is "${ job . name } "` ) ;
8891
89- const jobMatch = job . name . match ( / .+ \( ( .+ ?) \) / ) ;
92+ const jobMatch = job . name . match ( job_regex ) ;
93+
9094 if ( ! jobMatch || jobMatch . length === 0 ) {
9195 console . log ( "job match fail" ) ;
9296 continue ;
9397 }
9498
95- const info = jobMatch [ 1 ] . split ( ", " ) ;
96-
97- console . log ( "info: " , info ) ;
98-
99- const osName = info [ 0 ] ;
100- const osVersion = info [ 1 ] ;
101- const buildType = info [ 2 ] ;
102- const cppVersion = info [ 3 ] ;
103- // const boostVersion = info[4];
104- const compilerName = info [ 5 ] ;
105- const compilerVersion = info [ 6 ] ;
106- // const compilerExecutable = info[7];
107-
108- const url = `https://github.com/${ owner } /${ repo } /actions/runs/${ runId } /job/${ jobId } #step:${ stepId } :1` ;
99+ console . log ( jobMatch ) ;
109100
110- matrix [ osName + osVersion ] ??= { } ;
111- matrix [ osName + osVersion ] [ compilerName ] ??= { } ;
112- matrix [ osName + osVersion ] [ compilerName ] [ compilerVersion ] ??= { } ;
113- matrix [ osName + osVersion ] [ compilerName ] [ compilerVersion ] [ buildType ] ??= [ ] ;
114- matrix [ osName + osVersion ] [ compilerName ] [ compilerVersion ] [ buildType ] [
115- ( parseInt ( cppVersion ) - 23 ) / 3
116- ] ??= `<a href="${ url } ">${ compileResult } </a>` ;
101+ // const url = `https://github.com/${owner}/${repo}/actions/runs/${runId}/job/${jobId}#step:${stepId}:1`;
117102}
118103
119104console . log ( matrix ) ;
0 commit comments