mirror of
https://github.com/docker/setup-qemu-action.git
synced 2024-11-15 20:03:50 +08:00
Merge pull request #31 from crazy-max/fix-setoutput
Fix setOutput behavior
This commit is contained in:
commit
c308fdd69d
7
dist/index.js
generated
vendored
7
dist/index.js
generated
vendored
@ -93,6 +93,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|||||||
const mexec = __importStar(__webpack_require__(757));
|
const mexec = __importStar(__webpack_require__(757));
|
||||||
const core = __importStar(__webpack_require__(186));
|
const core = __importStar(__webpack_require__(186));
|
||||||
const exec = __importStar(__webpack_require__(514));
|
const exec = __importStar(__webpack_require__(514));
|
||||||
|
const command_1 = __webpack_require__(241);
|
||||||
function run() {
|
function run() {
|
||||||
return __awaiter(this, void 0, void 0, function* () {
|
return __awaiter(this, void 0, void 0, function* () {
|
||||||
try {
|
try {
|
||||||
@ -115,7 +116,7 @@ function run() {
|
|||||||
}
|
}
|
||||||
const platforms = JSON.parse(res.stdout.trim());
|
const platforms = JSON.parse(res.stdout.trim());
|
||||||
core.info(`${platforms.supported.join(',')}`);
|
core.info(`${platforms.supported.join(',')}`);
|
||||||
core.setOutput('platforms', platforms.supported.join(','));
|
setOutput('platforms', platforms.supported.join(','));
|
||||||
});
|
});
|
||||||
core.endGroup();
|
core.endGroup();
|
||||||
}
|
}
|
||||||
@ -124,6 +125,10 @@ function run() {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
// FIXME: Temp fix https://github.com/actions/toolkit/issues/777
|
||||||
|
function setOutput(name, value) {
|
||||||
|
command_1.issueCommand('set-output', { name }, value);
|
||||||
|
}
|
||||||
run();
|
run();
|
||||||
//# sourceMappingURL=main.js.map
|
//# sourceMappingURL=main.js.map
|
||||||
|
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
import * as mexec from './exec';
|
import * as mexec from './exec';
|
||||||
import * as core from '@actions/core';
|
import * as core from '@actions/core';
|
||||||
import * as exec from '@actions/exec';
|
import * as exec from '@actions/exec';
|
||||||
|
import {issueCommand} from '@actions/core/lib/command';
|
||||||
|
|
||||||
interface Platforms {
|
interface Platforms {
|
||||||
supported: string[];
|
supported: string[];
|
||||||
@ -32,7 +33,7 @@ async function run(): Promise<void> {
|
|||||||
}
|
}
|
||||||
const platforms: Platforms = JSON.parse(res.stdout.trim());
|
const platforms: Platforms = JSON.parse(res.stdout.trim());
|
||||||
core.info(`${platforms.supported.join(',')}`);
|
core.info(`${platforms.supported.join(',')}`);
|
||||||
core.setOutput('platforms', platforms.supported.join(','));
|
setOutput('platforms', platforms.supported.join(','));
|
||||||
});
|
});
|
||||||
core.endGroup();
|
core.endGroup();
|
||||||
} catch (error) {
|
} 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();
|
run();
|
||||||
|
Loading…
Reference in New Issue
Block a user