mirror of
https://github.com/docker/build-push-action.git
synced 2025-06-13 14:47:13 +02:00
add imageid output and use metadata to set digest output
Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
This commit is contained in:
17
src/main.ts
17
src/main.ts
@ -34,16 +34,23 @@ async function run(): Promise<void> {
|
||||
});
|
||||
|
||||
const imageID = await buildx.getImageID();
|
||||
const metadata = await buildx.getMetadata();
|
||||
const digest = await buildx.getDigest(metadata);
|
||||
|
||||
if (imageID) {
|
||||
await core.group(`Digest output`, async () => {
|
||||
await core.group(`ImageID`, async () => {
|
||||
core.info(imageID);
|
||||
context.setOutput('digest', imageID);
|
||||
context.setOutput('imageid', imageID);
|
||||
});
|
||||
}
|
||||
if (digest) {
|
||||
await core.group(`Digest`, async () => {
|
||||
core.info(digest);
|
||||
context.setOutput('digest', digest);
|
||||
});
|
||||
}
|
||||
|
||||
const metadata = await buildx.getMetadata();
|
||||
if (metadata) {
|
||||
await core.group(`Metadata output`, async () => {
|
||||
await core.group(`Metadata`, async () => {
|
||||
core.info(metadata);
|
||||
context.setOutput('metadata', metadata);
|
||||
});
|
||||
|
Reference in New Issue
Block a user