GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Merge pull request #707 from crazy-max/fix-dbc-summary · docker/actions-toolkit@88d39b6

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
  • src
    • github.ts
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎src/github.ts‎

Copy file name to clipboardExpand all lines: src/github.ts
+6-6Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff 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(/^cloud:\/\//, '').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:`)

0 commit comments

Comments
0 (0)
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.