mirror of
https://github.com/actions/typescript-action.git
synced 2025-04-08 08:19:53 +00:00
update with tests
This commit is contained in:
11
src/main.ts
11
src/main.ts
@ -1,9 +1,16 @@
|
||||
import * as core from '@actions/core';
|
||||
import {wait} from './wait'
|
||||
|
||||
async function run() {
|
||||
try {
|
||||
const myInput = core.getInput('myInput');
|
||||
core.debug(`Hello ${myInput}`);
|
||||
const ms = core.getInput('milliseconds');
|
||||
console.log(`Waiting ${ms} milliseconds ...`)
|
||||
|
||||
core.debug((new Date()).toTimeString())
|
||||
wait(parseInt(ms));
|
||||
core.debug((new Date()).toTimeString())
|
||||
|
||||
core.setOutput('time', new Date().toTimeString());
|
||||
} catch (error) {
|
||||
core.setFailed(error.message);
|
||||
}
|
||||
|
Reference in New Issue
Block a user