This commit is contained in:
+25
@@ -0,0 +1,25 @@
|
||||
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`);
|
||||
return value;
|
||||
};
|
||||
|
||||
const manifest = await prepareRuntime(
|
||||
env("ACTION_PATH"),
|
||||
env("RUNNER_TEMP"),
|
||||
env("BOT_AGENTS_MASTER_KEY"),
|
||||
);
|
||||
try {
|
||||
await Deno.writeTextFile(
|
||||
env("GITHUB_OUTPUT"),
|
||||
`manifest=${manifest.manifestPath}\n`,
|
||||
{ append: true },
|
||||
);
|
||||
} catch (error) {
|
||||
await Deno.remove(manifest.runtimeDir, { recursive: true }).catch(() =>
|
||||
undefined
|
||||
);
|
||||
throw error;
|
||||
}
|
||||
Reference in New Issue
Block a user