feat: github aciton

This commit is contained in:
thomas
2024-04-17 18:36:43 +02:00
parent 04b1b4e565
commit 16e38ba91a
3 changed files with 3 additions and 2 deletions

15
.github/github-action/index.js vendored Normal file
View File

@@ -0,0 +1,15 @@
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);
}