feat: test github actio

This commit is contained in:
thomas
2024-04-17 14:08:23 +02:00
parent b589eacc41
commit 1e2c5e28a9
5 changed files with 262 additions and 1 deletions

15
.github/workflows/add-label/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);
}