From 7ca0f811dfa10e0ee3f2d096efee220881c15cfc Mon Sep 17 00:00:00 2001 From: CrazyMax Date: Wed, 9 Feb 2022 11:36:19 +0100 Subject: [PATCH] Enhance outputs display Signed-off-by: CrazyMax --- dist/index.js | 12 ++++++------ src/main.ts | 12 ++++++------ 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/dist/index.js b/dist/index.js index eb80c0f..77c4e2d 100644 --- a/dist/index.js +++ b/dist/index.js @@ -337,13 +337,13 @@ function run() { throw new Error(`buildx bake failed with: ${res.stderr.match(/(.*)\s*$/)[0].trim()}`); } }); - yield core.group(`Setting outputs`, () => __awaiter(this, void 0, void 0, function* () { - const metadata = yield buildx.getMetadata(); - if (metadata) { - core.info(`metadata=${metadata}`); + const metadata = yield buildx.getMetadata(); + if (metadata) { + yield core.group(`Metadata output`, () => __awaiter(this, void 0, void 0, function* () { + core.info(metadata); context.setOutput('metadata', metadata); - } - })); + })); + } } catch (error) { core.setFailed(error.message); diff --git a/src/main.ts b/src/main.ts index 5da9cbf..3fe2579 100644 --- a/src/main.ts +++ b/src/main.ts @@ -36,13 +36,13 @@ async function run(): Promise { } }); - await core.group(`Setting outputs`, async () => { - const metadata = await buildx.getMetadata(); - 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); }