File tree 1 file changed +6
-6
lines changed 1 file changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -233,15 +233,15 @@ export class GitHub {
233
233
return `<a href="${ url } ">${ text } </a>` + ( addEOL ? os . EOL : '' ) ;
234
234
} ;
235
235
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 ;
240
240
241
241
const sum = core . summary . addHeading ( 'Docker Build summary' , 2 ) ;
242
242
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 ) ;
245
245
// prettier-ignore
246
246
sum . addRaw ( `<p>` )
247
247
. 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