Created
September 17, 2021 17:43
-
-
Save hackintoshrao/27116f33097c32625f69a8818fece26c to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const core = require('@actions/core'); | |
const github = require('@actions/github'); | |
try { | |
// `who-to-greet` input defined in action metadata file | |
const nameToGreet = core.getInput('who-to-greet'); | |
console.log(`Hello ${nameToGreet}!`); | |
const time = (new Date()).toTimeString(); | |
core.setOutput("time", time); | |
// Get the JSON webhook payload for the event that triggered the workflow | |
const payload = JSON.stringify(github.context.payload, undefined, 2) | |
console.log(`The event payload: ${payload}`); | |
} catch (error) { | |
core.setFailed(error.message); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment