Fix setOutput

Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
This commit is contained in:
CrazyMax 2021-04-27 16:30:22 +02:00
parent 3ce082ae8d
commit 5e92e6623e
No known key found for this signature in database
GPG key ID: 3248E46B6BB8C7F7
4 changed files with 45 additions and 3 deletions

View file

@ -6,6 +6,7 @@ import * as semver from 'semver';
import * as tmp from 'tmp';
import * as core from '@actions/core';
import {issueCommand} from '@actions/core/lib/command';
import * as github from '@actions/github';
import * as buildx from './buildx';
@ -205,3 +206,8 @@ export const asyncForEach = async (array, callback) => {
await callback(array[index], index, array);
}
};
// FIXME: Temp fix https://github.com/actions/toolkit/issues/777
export function setOutput(name: string, value: any): void {
issueCommand('set-output', {name}, value);
}

View file

@ -36,7 +36,7 @@ async function run(): Promise<void> {
if (imageID) {
core.startGroup(`Extracting digest`);
core.info(`${imageID}`);
core.setOutput('digest', imageID);
context.setOutput('digest', imageID);
core.endGroup();
}
} catch (error) {