2019-07-10 22:54:25 +08:00
|
|
|
import * as core from '@actions/core';
|
2019-07-11 11:11:48 +08:00
|
|
|
import * as installer from './installer';
|
2019-07-10 22:54:25 +08:00
|
|
|
|
|
|
|
async function run() {
|
2019-07-11 11:11:48 +08:00
|
|
|
try {
|
|
|
|
const version = core.getInput('version', {required: true});
|
|
|
|
const arch = core.getInput('architecture', {required: true});
|
|
|
|
const jdkFile = core.getInput('jdkFile', {required: true});
|
|
|
|
|
|
|
|
await installer.getJava(version, arch, jdkFile);
|
|
|
|
} catch (error) {
|
|
|
|
core.setFailed(error.message);
|
|
|
|
}
|
2019-07-10 22:54:25 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
run();
|