mirror of
https://github.com/docker/setup-buildx-action.git
synced 2025-04-23 08:26:38 +02:00
Remove workaround for setOutput
Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
This commit is contained in:
parent
90a1e4619e
commit
40fefd8a58
5 changed files with 9 additions and 47 deletions
|
@ -5,7 +5,6 @@ import * as tmp from 'tmp';
|
|||
import * as uuid from 'uuid';
|
||||
import * as buildx from './buildx';
|
||||
import * as core from '@actions/core';
|
||||
import {issueCommand} from '@actions/core/lib/command';
|
||||
|
||||
let _tmpDir: string;
|
||||
export const osPlat: string = os.platform();
|
||||
|
@ -104,8 +103,3 @@ 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: unknown): void {
|
||||
issueCommand('set-output', {name}, value);
|
||||
}
|
||||
|
|
14
src/main.ts
14
src/main.ts
|
@ -53,7 +53,7 @@ async function run(): Promise<void> {
|
|||
});
|
||||
});
|
||||
|
||||
context.setOutput('name', inputs.name);
|
||||
core.setOutput('name', inputs.name);
|
||||
stateHelper.setBuilderName(inputs.name);
|
||||
|
||||
const credsdir = path.join(dockerConfigHome, 'buildx', 'creds', inputs.name);
|
||||
|
@ -89,12 +89,12 @@ async function run(): Promise<void> {
|
|||
const builder = await buildx.inspect(inputs.name, standalone);
|
||||
const firstNode = builder.nodes[0];
|
||||
core.info(JSON.stringify(builder, undefined, 2));
|
||||
context.setOutput('driver', builder.driver);
|
||||
context.setOutput('platforms', firstNode.platforms);
|
||||
context.setOutput('nodes', JSON.stringify(builder.nodes, undefined, 2));
|
||||
context.setOutput('endpoint', firstNode.endpoint); // TODO: deprecated, to be removed in a later version
|
||||
context.setOutput('status', firstNode.status); // TODO: deprecated, to be removed in a later version
|
||||
context.setOutput('flags', firstNode['buildkitd-flags']); // TODO: deprecated, to be removed in a later version
|
||||
core.setOutput('driver', builder.driver);
|
||||
core.setOutput('platforms', firstNode.platforms);
|
||||
core.setOutput('nodes', JSON.stringify(builder.nodes, undefined, 2));
|
||||
core.setOutput('endpoint', firstNode.endpoint); // TODO: deprecated, to be removed in a later version
|
||||
core.setOutput('status', firstNode.status); // TODO: deprecated, to be removed in a later version
|
||||
core.setOutput('flags', firstNode['buildkitd-flags']); // TODO: deprecated, to be removed in a later version
|
||||
core.endGroup();
|
||||
|
||||
if (!standalone && builder.driver == 'docker-container') {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue