Files
shockbot/entry.ts
T
2026-01-29 22:49:00 +00:00

31 lines
692 B
JavaScript

#!/usr/bin/env node
/**
* entry point for pullfrog/pullfrog - unified action
*/
import * as core from "@actions/core";
import { main } from "./main.ts";
import { runCleanup } from "./utils/exitHandler.ts";
async function run(): Promise<void> {
try {
const result = await main();
if (!result.success) {
throw new Error(result.error || "Agent execution failed");
}
if (result.result) {
core.setOutput("result", result.result);
}
} catch (error) {
const errorMessage = error instanceof Error ? error.message : "Unknown error occurred";
core.setFailed(`Action failed: ${errorMessage}`);
} finally {
await runCleanup();
}
}
await run();