mirror of
https://github.com/oven-sh/setup-bun.git
synced 2025-02-23 10:40:10 +08:00
18 lines
505 B
JavaScript
18 lines
505 B
JavaScript
import { tmpdir } from "node:os";
|
|
import * as action from "@actions/core";
|
|
import setup from "./setup.js";
|
|
if (!process.env.RUNNER_TEMP) {
|
|
process.env.RUNNER_TEMP = tmpdir();
|
|
}
|
|
setup({
|
|
version: action.getInput("bun-version") || undefined,
|
|
customUrl: action.getInput("bun-download-url") || undefined,
|
|
})
|
|
.then(({ version, cacheHit }) => {
|
|
action.setOutput("bun-version", version);
|
|
action.setOutput("cache-hit", cacheHit);
|
|
})
|
|
.catch((error) => {
|
|
action.setFailed(error);
|
|
});
|