2019-12-06 19:22:35 +00:00
|
|
|
import * as core from '@actions/core'
|
2019-09-21 12:56:30 +00:00
|
|
|
import {wait} from './wait'
|
2019-07-22 18:15:40 +00:00
|
|
|
|
2019-12-06 19:22:35 +00:00
|
|
|
async function run(): Promise<void> {
|
2019-07-22 18:15:40 +00:00
|
|
|
try {
|
2019-12-06 19:22:35 +00:00
|
|
|
const ms: string = core.getInput('milliseconds')
|
2020-07-20 11:07:15 +00:00
|
|
|
core.debug(`Waiting ${ms} milliseconds ...`) // debug is only output if you set the secret `ACTIONS_RUNNER_DEBUG` to true
|
2019-09-21 12:56:30 +00:00
|
|
|
|
2019-12-06 19:22:35 +00:00
|
|
|
core.debug(new Date().toTimeString())
|
|
|
|
await wait(parseInt(ms, 10))
|
|
|
|
core.debug(new Date().toTimeString())
|
2019-09-21 12:56:30 +00:00
|
|
|
|
2019-12-06 19:22:35 +00:00
|
|
|
core.setOutput('time', new Date().toTimeString())
|
2019-07-22 18:15:40 +00:00
|
|
|
} catch (error) {
|
2019-12-06 19:22:35 +00:00
|
|
|
core.setFailed(error.message)
|
2019-07-22 18:15:40 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2019-12-06 19:22:35 +00:00
|
|
|
run()
|