Skip to content

Commit 08f4567

Browse files
authored
Merge pull request #1 from actions/rachmari-patch-1
Remove async function wrapper
2 parents e8a9511 + 03771eb commit 08f4567

File tree

1 file changed

+10
-12
lines changed

1 file changed

+10
-12
lines changed

index.js

Lines changed: 10 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,13 @@
11
const core = require('@actions/core');
2-
const github = require('@actions/core');
2+
const github = require('@actions/github');
33

4-
async function run() {
5-
try {
6-
const nameToGreet = core.getInput('who-to-greet');
7-
core.debug(`Hello ${nameToGreet}!`);
8-
const time = (new Date()).toTimeString();
9-
core.setOutput("time", time);
10-
} catch (error) {
11-
core.setFailed(error.message);
12-
}
4+
try {
5+
const nameToGreet = core.getInput('who-to-greet');
6+
console.log(`Hello ${nameToGreet}!`);
7+
const time = (new Date()).toTimeString();
8+
core.setOutput("time", time);
9+
const payload = JSON.stringify(github.context.payload, undefined, 2)
10+
console.log(`The event payload: ${payload}`);
11+
} catch (error) {
12+
core.setFailed(error.message);
1313
}
14-
15-
run();

0 commit comments

Comments
 (0)