generated from actions/javascript-action
-
Notifications
You must be signed in to change notification settings - Fork 1
/
index.js
27 lines (20 loc) · 735 Bytes
/
index.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
const core = require('@actions/core');
// const wait = require('./wait');
const milestone = require('./milestone');
// most @actions toolkit packages have async methods
async function run() {
try {
const version = core.getInput('version');
await milestone(version);
core.info('Done');
// const ms = core.getInput('milliseconds');
// core.info(`Waiting ${ms} milliseconds ...`);
// core.debug((new Date()).toTimeString()); // debug is only output if you set the secret `ACTIONS_RUNNER_DEBUG` to true
// await wait(parseInt(ms));
// core.info((new Date()).toTimeString());
core.setOutput('time', new Date().toTimeString());
} catch (error) {
core.setFailed(error.message);
}
}
run();