mirror of
https://github.com/docker/build-push-action.git
synced 2024-11-30 14:49:03 +00:00
Enhance outputs display
Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
This commit is contained in:
parent
7f9d37fa54
commit
5af8693d82
18
dist/index.js
generated
vendored
18
dist/index.js
generated
vendored
@ -516,19 +516,21 @@ function run() {
|
|||||||
throw new Error(`buildx failed with: ${res.stderr.match(/(.*)\s*$/)[0].trim()}`);
|
throw new Error(`buildx failed with: ${res.stderr.match(/(.*)\s*$/)[0].trim()}`);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
yield core.group(`Setting outputs`, () => __awaiter(this, void 0, void 0, function* () {
|
|
||||||
const imageID = yield buildx.getImageID();
|
const imageID = yield buildx.getImageID();
|
||||||
const metadata = yield buildx.getMetadata();
|
|
||||||
if (imageID) {
|
if (imageID) {
|
||||||
core.info(`digest=${imageID}`);
|
yield core.group(`Digest output`, () => __awaiter(this, void 0, void 0, function* () {
|
||||||
|
core.info(imageID);
|
||||||
context.setOutput('digest', imageID);
|
context.setOutput('digest', imageID);
|
||||||
}
|
|
||||||
if (metadata) {
|
|
||||||
core.info(`metadata=${metadata}`);
|
|
||||||
context.setOutput('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) {
|
catch (error) {
|
||||||
core.setFailed(error.message);
|
core.setFailed(error.message);
|
||||||
}
|
}
|
||||||
|
19
src/main.ts
19
src/main.ts
@ -33,18 +33,21 @@ async function run(): Promise<void> {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
await core.group(`Setting outputs`, async () => {
|
|
||||||
const imageID = await buildx.getImageID();
|
const imageID = await buildx.getImageID();
|
||||||
const metadata = await buildx.getMetadata();
|
|
||||||
if (imageID) {
|
if (imageID) {
|
||||||
core.info(`digest=${imageID}`);
|
await core.group(`Digest output`, async () => {
|
||||||
|
core.info(imageID);
|
||||||
context.setOutput('digest', imageID);
|
context.setOutput('digest', imageID);
|
||||||
}
|
|
||||||
if (metadata) {
|
|
||||||
core.info(`metadata=${metadata}`);
|
|
||||||
context.setOutput('metadata', metadata);
|
|
||||||
}
|
|
||||||
});
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
const metadata = await buildx.getMetadata();
|
||||||
|
if (metadata) {
|
||||||
|
await core.group(`Metadata output`, async () => {
|
||||||
|
core.info(metadata);
|
||||||
|
context.setOutput('metadata', metadata);
|
||||||
|
});
|
||||||
|
}
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
core.setFailed(error.message);
|
core.setFailed(error.message);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user