Adds index.js

Signed-off-by: Shakar <5h4k4r.b4kr@gmail.com>
This commit is contained in:
Shakar 2023-09-11 12:14:55 +03:00
parent 7859f129f4
commit 561e53277f
No known key found for this signature in database
GPG Key ID: DA55A26823AE3C28

17
index.js Normal file
View File

@ -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);
}