From 561e53277f37da3cbf0c185b2700a1ce4efd6de9 Mon Sep 17 00:00:00 2001 From: Shakar <5h4k4r.b4kr@gmail.com> Date: Mon, 11 Sep 2023 12:14:55 +0300 Subject: [PATCH] Adds index.js Signed-off-by: Shakar <5h4k4r.b4kr@gmail.com> --- index.js | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 index.js diff --git a/index.js b/index.js new file mode 100644 index 0000000..2026cd4 --- /dev/null +++ b/index.js @@ -0,0 +1,17 @@ +const core = 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 payload = JSON.stringify(github.context.payload, undefined, 2) + + console.log(`The event payload: ${payload}`); +} catch (error) { + core.setFailed(error.message); +}