Permalink
19 lines (15 sloc)
558 Bytes
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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) { | |
if (error instanceof Error) core.setFailed(error.message) | |
} | |
} | |
run() |