mirror of
https://github.com/actions/typescript-action.git
synced 2025-12-08 19:56:27 +00:00
To enable `core.debug` output, `ACTIONS_STEP_DEBUG` should be true instead of `ACTIONS_RUNNER_DEBUG`. https://docs.github.com/en/actions/managing-workflow-runs/enabling-debug-logging#enabling-step-debug-logging
20 lines
530 B
TypeScript
20 lines
530 B
TypeScript
import * as core from '@actions/core'
|
|
import {wait} from './wait'
|
|
|
|
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_STEP_DEBUG` to true
|
|
|
|
core.debug(new Date().toTimeString())
|
|
await wait(parseInt(ms, 10))
|
|
core.debug(new Date().toTimeString())
|
|
|
|
core.setOutput('time', new Date().toTimeString())
|
|
} catch (error) {
|
|
core.setFailed(error.message)
|
|
}
|
|
}
|
|
|
|
run()
|