s3-cache/src/index.js
Maximilian Jugl b04a255b4c
All checks were successful
Check build / check-dist (push) Successful in 1m24s
Run tests / Run vitest integration tests (push) Successful in 1m29s
feat: initial
2026-04-23 09:49:39 +02:00

23 lines
489 B
JavaScript

import * as core from "@actions/core";
import { checkPrerequisites } from "./utils";
import { restore } from "./restore";
import { save } from "./save";
const run = async () => {
const isPost = core.getState("isPost") === "true";
try {
await checkPrerequisites();
if (!isPost) {
core.saveState("isPost", "true");
await restore();
} else {
await save();
}
} catch (error) {
core.setFailed(`Unexpected error: ${error.message}`);
}
};
run();