Add post hooks for cleanup (#193)

* Add post hooks for cleanup

* Switch to signal-based cleanup

* Better exit handling
This commit is contained in:
Colin McDonnell
2026-01-28 01:59:15 +00:00
committed by pullfrog[bot]
parent 90945a9481
commit 102417f442
9 changed files with 20395 additions and 20370 deletions
+3
View File
@@ -6,6 +6,7 @@
import * as core from "@actions/core";
import { main } from "./main.ts";
import { runCleanup } from "./utils/exitHandler.ts";
async function run(): Promise<void> {
try {
@@ -17,6 +18,8 @@ async function run(): Promise<void> {
} catch (error) {
const errorMessage = error instanceof Error ? error.message : "Unknown error occurred";
core.setFailed(`Action failed: ${errorMessage}`);
} finally {
await runCleanup();
}
}