From 714c83b2736d7e308bc33c49057952490eb98be2 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Sun, 20 Oct 2024 23:07:42 +0200 Subject: Adding upstream version 1.21.4. Signed-off-by: Daniel Baumann --- pkg/runner/testdata/actions/node16/index.js | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 pkg/runner/testdata/actions/node16/index.js (limited to 'pkg/runner/testdata/actions/node16/index.js') diff --git a/pkg/runner/testdata/actions/node16/index.js b/pkg/runner/testdata/actions/node16/index.js new file mode 100644 index 0000000..5767cf1 --- /dev/null +++ b/pkg/runner/testdata/actions/node16/index.js @@ -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); +} \ No newline at end of file -- cgit v1.2.3