mirror of
https://github.com/actions/hello-world-javascript-action.git
synced 2025-04-06 14:39:37 +00:00
Remove async function wrapper
This commit is contained in:
19
index.js
19
index.js
@ -1,15 +1,12 @@
|
||||
const core = require('@actions/core');
|
||||
const github = require('@actions/core');
|
||||
|
||||
async function run() {
|
||||
try {
|
||||
const nameToGreet = core.getInput('who-to-greet');
|
||||
core.debug(`Hello ${nameToGreet}!`);
|
||||
const time = (new Date()).toTimeString();
|
||||
core.setOutput("time", time);
|
||||
} catch (error) {
|
||||
core.setFailed(error.message);
|
||||
}
|
||||
}
|
||||
|
||||
run();
|
||||
try {
|
||||
const nameToGreet = core.getInput('who-to-greet');
|
||||
core.debug(`Hello ${nameToGreet}!`);
|
||||
const time = (new Date()).toTimeString();
|
||||
core.setOutput("time", time);
|
||||
} catch (error) {
|
||||
core.setFailed(error.message);
|
||||
}
|
||||
|
Reference in New Issue
Block a user