refactor: to node action (#47)
CD / Release (push) Successful in 33s

Refactoring the action from a composite to Node action. This change improves security through pinning of packages as well as better test-ability and error handling.

Reviewed-on: #47
Co-authored-by: Timo Behrendt <t.behrendt@t00n.de>
Co-committed-by: Timo Behrendt <t.behrendt@t00n.de>
This commit was merged in pull request #47.
This commit is contained in:
2026-06-27 14:00:15 +02:00
committed by t.behrendt
parent 3730a56a77
commit 30070f7f9c
20 changed files with 24600 additions and 174 deletions
+18
View File
@@ -0,0 +1,18 @@
import * as core from "@actions/core";
import { readFileSync } from "node:fs";
import { validateJson } from "./validation";
export async function run(): Promise<void> {
try {
const jsonFilePath = core.getInput("json-file");
core.info(`Validating JSON file: ${jsonFilePath}`);
const json = readFileSync(jsonFilePath, "utf8");
await validateJson(json);
core.info("JSON file is valid");
} catch (error) {
core.setFailed(`Error validating JSON file: ${error}`);
}
}