mirror of
https://gitea.com/actions/setup-java.git
synced 2025-11-11 03:16:26 +08:00
Features/installer (#1)
* Initial attempt * Clean up * Extract right directory * Log whats happening * Read correct directory * Full path * Allow java to be found in cache * Add tests
This commit is contained in:
@@ -16,10 +16,18 @@ var __importStar = (this && this.__importStar) || function (mod) {
|
||||
};
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
const core = __importStar(require("@actions/core"));
|
||||
const installer = __importStar(require("./installer"));
|
||||
function run() {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
const myInput = core.getInput('myInput');
|
||||
core.debug(`Hello ${myInput}`);
|
||||
try {
|
||||
const version = core.getInput('version', { required: true });
|
||||
const arch = core.getInput('architecture', { required: true });
|
||||
const jdkFile = core.getInput('jdkFile', { required: true });
|
||||
yield installer.getJava(version, arch, jdkFile);
|
||||
}
|
||||
catch (error) {
|
||||
core.setFailed(error.message);
|
||||
}
|
||||
});
|
||||
}
|
||||
run();
|
||||
|
||||
Reference in New Issue
Block a user