File tree Expand file tree Collapse file tree 1 file changed +6
-6
lines changed Expand file tree Collapse file tree 1 file changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -233,15 +233,15 @@ export class GitHub {
233233 return `<a href="${ url } ">${ text } </a>` + ( addEOL ? os . EOL : '' ) ;
234234 } ;
235235
236- const refsSize = Object . keys ( opts . exportRes . refs ) . length ;
237- const singleRef = refsSize === 1 ? Object . keys ( opts . exportRes . refs ) [ 0 ] : undefined ;
238- const singleSummary = singleRef && opts . exportRes . summaries ?. [ singleRef ] ;
239- const dbcAccount = opts . driver === 'cloud' && opts . endpoint ?. split ( '/' ) [ 0 ] ;
236+ const refsSize = opts . exportRes . refs . length ;
237+ const firstRef = refsSize > 0 ? opts . exportRes . refs ?. [ 0 ] : undefined ;
238+ const firstSummary = firstRef ? opts . exportRes . summaries ?. [ firstRef ] : undefined ;
239+ const dbcAccount = opts . driver === 'cloud' && opts . endpoint ? opts . endpoint ?. replace ( / ^ c l o u d : \/ \/ / , '' ) . split ( '/' ) [ 0 ] : undefined ;
240240
241241 const sum = core . summary . addHeading ( 'Docker Build summary' , 2 ) ;
242242
243- if ( dbcAccount && singleRef && singleSummary ) {
244- const buildURL = GitHub . formatDBCBuildURL ( dbcAccount , singleRef , singleSummary . defaultPlatform ) ;
243+ if ( dbcAccount && refsSize === 1 && firstRef && firstSummary ) {
244+ const buildURL = GitHub . formatDBCBuildURL ( dbcAccount , firstRef , firstSummary . defaultPlatform ) ;
245245 // prettier-ignore
246246 sum . addRaw ( `<p>` )
247247 . addRaw ( `For a detailed look at the build, you can check the results at:` )
You can’t perform that action at this time.
0 commit comments