Skip to content

Commit

Permalink
Enhance outputs display
Browse files Browse the repository at this point in the history
Signed-off-by: CrazyMax <[email protected]>
  • Loading branch information
crazy-max committed Feb 9, 2022
1 parent 7f9d37f commit 5af8693
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 20 deletions.
22 changes: 12 additions & 10 deletions dist/index.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

23 changes: 13 additions & 10 deletions src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,18 +33,21 @@ async function run(): Promise<void> {
}
});

await core.group(`Setting outputs`, async () => {
const imageID = await buildx.getImageID();
const metadata = await buildx.getMetadata();
if (imageID) {
core.info(`digest=${imageID}`);
const imageID = await buildx.getImageID();
if (imageID) {
await core.group(`Digest output`, async () => {
core.info(imageID);
context.setOutput('digest', imageID);
}
if (metadata) {
core.info(`metadata=${metadata}`);
});
}

const metadata = await buildx.getMetadata();
if (metadata) {
await core.group(`Metadata output`, async () => {
core.info(metadata);
context.setOutput('metadata', metadata);
}
});
});
}
} catch (error) {
core.setFailed(error.message);
}
Expand Down

0 comments on commit 5af8693

Please sign in to comment.