mirror of
https://github.com/jdx/mise-action.git
synced 2026-05-20 16:21:53 +00:00
Initial commit
This commit is contained in:
commit
35f6329d75
25 changed files with 17897 additions and 0 deletions
19
src/main.ts
Normal file
19
src/main.ts
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
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()
|
||||
Loading…
Add table
Add a link
Reference in a new issue