mirror of
https://github.com/docker/setup-qemu-action.git
synced 2025-07-06 18:38:24 +02:00
Fix setOutput behavior
Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
This commit is contained in:
@ -1,6 +1,7 @@
|
||||
import * as mexec from './exec';
|
||||
import * as core from '@actions/core';
|
||||
import * as exec from '@actions/exec';
|
||||
import {issueCommand} from '@actions/core/lib/command';
|
||||
|
||||
interface Platforms {
|
||||
supported: string[];
|
||||
@ -32,7 +33,7 @@ async function run(): Promise<void> {
|
||||
}
|
||||
const platforms: Platforms = JSON.parse(res.stdout.trim());
|
||||
core.info(`${platforms.supported.join(',')}`);
|
||||
core.setOutput('platforms', platforms.supported.join(','));
|
||||
setOutput('platforms', platforms.supported.join(','));
|
||||
});
|
||||
core.endGroup();
|
||||
} catch (error) {
|
||||
@ -40,4 +41,9 @@ async function run(): Promise<void> {
|
||||
}
|
||||
}
|
||||
|
||||
// FIXME: Temp fix https://github.com/actions/toolkit/issues/777
|
||||
function setOutput(name: string, value: any): void {
|
||||
issueCommand('set-output', {name}, value);
|
||||
}
|
||||
|
||||
run();
|
||||
|
Reference in New Issue
Block a user