refactor(actions): simplify action path structure

- Relocates action files to a flat directory structure
- Updates references to the new paths for better organization
This commit is contained in:
2025-07-04 11:35:10 +02:00
parent 5771982931
commit 30f83b08ee
3 changed files with 1 additions and 1 deletions

18
with-post-step/main.js Normal file
View File

@@ -0,0 +1,18 @@
const { spawn } = require("child_process");
const { appendFileSync } = require("fs");
const { EOL } = require("os");
function run(cmd) {
const proc = spawn(cmd, { stdio: "inherit", shell: true });
proc.on("exit", code => process.exitCode = code);
}
const key = process.env.INPUT_KEY.toUpperCase();
if (process.env[`STATE_${key}`] !== undefined) {
// ---------- POST ----------
run(process.env.INPUT_POST);
} else {
// ---------- MAIN ----------
appendFileSync(process.env.GITHUB_STATE, `${key}=true${EOL}`);
run(process.env.INPUT_MAIN);
}