Move the action from Deno to Node.js and Vite+
Agents / agent (pull_request) Has been skipped
Check / check (pull_request) Successful in 58s

This commit is contained in:
Danny Kim
2026-10-16 02:20:49 +09:00
parent 9b55e98d8c
commit 8f23da2b42
45 changed files with 5664 additions and 1731 deletions
+9 -6
View File
@@ -1,8 +1,13 @@
import { appendFile, rm } from "node:fs/promises";
import process from "node:process";
import { prepareRuntime } from "./runtime.ts";
const env = (name: string): string => {
const value = Deno.env.get(name);
if (!value) throw new Error(`${name} is not set`);
const value = process.env[name];
if (value === undefined || value === "") {
throw new Error(`${name} is not set`);
}
return value;
};
@@ -12,10 +17,8 @@ const manifest = await prepareRuntime(
env("BOT_AGENTS_MASTER_KEY"),
);
try {
await Deno.writeTextFile(env("GITHUB_OUTPUT"), `manifest=${manifest.manifestPath}\n`, {
append: true,
});
await appendFile(env("GITHUB_OUTPUT"), `manifest=${manifest.manifestPath}\n`);
} catch (error) {
await Deno.remove(manifest.runtimeDir, { recursive: true }).catch(() => undefined);
await rm(manifest.runtimeDir, { recursive: true }).catch(() => {});
throw error;
}