mirror of
https://github.com/actions/javascript-action.git
synced 2025-12-11 13:20:32 +00:00
starting...
This commit is contained in:
20
index.js
Normal file
20
index.js
Normal file
@@ -0,0 +1,20 @@
|
||||
const core = require('@actions/core');
|
||||
const wait = require('./wait');
|
||||
|
||||
async function run() {
|
||||
try {
|
||||
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);
|
||||
}
|
||||
}
|
||||
|
||||
run()
|
||||
Reference in New Issue
Block a user