mirror of
https://github.com/docker/build-push-action.git
synced 2025-04-20 10:26:44 +00:00
Add metadata
output
Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
This commit is contained in:
parent
ad1d2e93be
commit
c0b121fe44
9 changed files with 104 additions and 47 deletions
19
src/main.ts
19
src/main.ts
|
@ -33,13 +33,18 @@ async function run(): Promise<void> {
|
|||
}
|
||||
});
|
||||
|
||||
const imageID = await buildx.getImageID();
|
||||
if (imageID) {
|
||||
core.startGroup(`Extracting digest`);
|
||||
core.info(`${imageID}`);
|
||||
context.setOutput('digest', imageID);
|
||||
core.endGroup();
|
||||
}
|
||||
await core.group(`Setting outputs`, async () => {
|
||||
const imageID = await buildx.getImageID();
|
||||
const metadata = await buildx.getMetadata();
|
||||
if (imageID) {
|
||||
core.info(`digest=${imageID}`);
|
||||
context.setOutput('digest', imageID);
|
||||
}
|
||||
if (metadata) {
|
||||
core.info(`metadata=${metadata}`);
|
||||
context.setOutput('metadata', metadata);
|
||||
}
|
||||
});
|
||||
} catch (error) {
|
||||
core.setFailed(error.message);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue