diff --git a/index.js b/index.js index 36b99d8..7ebcb44 100644 --- a/index.js +++ b/index.js @@ -1,13 +1,13 @@ const core = require('@actions/core'); -const github = require('@actions/core'); +const github = require('@actions/github'); try { const nameToGreet = core.getInput('who-to-greet'); - console.log(`Hello ${nameToGreet}!`); - const time = (new Date()).toTimeString(); - core.setOutput("time", time); - const context = github.context; - core.debug(`The webhook payload: ${context.payload}`); + console.log(`Hello ${nameToGreet}!`); + const time = (new Date()).toTimeString(); + core.setOutput("time", time); + const payload = JSON.stringify(github.context.payload, undefined, 2) + console.log(`The event payload: ${payload}`); } catch (error) { core.setFailed(error.message); }