feat: implement basic feature working for Linux only

This commit is contained in:
Kengo TODA
2020-08-27 20:39:35 +08:00
parent 74c8587e44
commit 367ba4923b
11 changed files with 4741 additions and 77 deletions

View File

@@ -1,16 +1,13 @@
import * as core from '@actions/core'
import {wait} from './wait'
import {install} from './install'
async function run(): Promise<void> {
try {
const ms: string = core.getInput('milliseconds')
core.debug(`Waiting ${ms} milliseconds ...`) // debug is only output if you set the secret `ACTIONS_RUNNER_DEBUG` to true
core.debug(new Date().toTimeString())
await wait(parseInt(ms, 10))
core.debug(new Date().toTimeString())
core.setOutput('time', new Date().toTimeString())
const version: string = core.getInput('verison', {
required: true
})
const commandPath = await install(version)
core.addPath(commandPath)
} catch (error) {
core.setFailed(error.message)
}