mirror of
https://gitea.com/gitea/act_runner.git
synced 2026-08-14 06:51:52 +02:00
The runner is an application, not a library. `act/model` and `act/exprparser` were the last packages anything outside this repository consumed and they now live in actionslib, so nothing needs the rest of `act` to be importable, and keeping it importable invites the coupling that was just removed. Import paths only, the files are unchanged. Assisted-by: Codet:GPT-5.1-Codex
15 lines
490 B
JavaScript
15 lines
490 B
JavaScript
import {appendFileSync, readFileSync} from 'node:fs';
|
|
|
|
const nameToGreet = process.env['INPUT_WHO-TO-GREET'] || 'World';
|
|
console.log(`Hello ${nameToGreet}!`);
|
|
|
|
if (process.env.GITHUB_OUTPUT) {
|
|
appendFileSync(process.env.GITHUB_OUTPUT, `time=${new Date().toTimeString()}\n`);
|
|
}
|
|
|
|
let payload = {};
|
|
if (process.env.GITHUB_EVENT_PATH) {
|
|
payload = JSON.parse(readFileSync(process.env.GITHUB_EVENT_PATH, 'utf8'));
|
|
}
|
|
console.log(`The event payload: ${JSON.stringify(payload, undefined, 2)}`);
|