mirror of
https://github.com/oven-sh/setup-bun.git
synced 2025-07-18 04:28:28 +02:00
Refactor to boolean input
This commit is contained in:
parent
01dacaa127
commit
fe6ae30010
3 changed files with 19 additions and 12 deletions
|
@ -16,6 +16,7 @@ inputs:
|
||||||
description: "The scope for authenticating with the package registry."
|
description: "The scope for authenticating with the package registry."
|
||||||
disable-cache:
|
disable-cache:
|
||||||
required: false
|
required: false
|
||||||
|
type: boolean
|
||||||
description: "Disable caching of bun executable."
|
description: "Disable caching of bun executable."
|
||||||
outputs:
|
outputs:
|
||||||
bun-version:
|
bun-version:
|
||||||
|
|
20
dist/index.js
generated
vendored
20
dist/index.js
generated
vendored
File diff suppressed because one or more lines are too long
10
src/index.ts
10
src/index.ts
|
@ -1,7 +1,13 @@
|
||||||
import { tmpdir } from "node:os";
|
import { tmpdir } from "node:os";
|
||||||
import { join } from "node:path";
|
import { join } from "node:path";
|
||||||
import { existsSync, readFileSync } from "node:fs";
|
import { existsSync, readFileSync } from "node:fs";
|
||||||
import { getInput, setOutput, setFailed, warning } from "@actions/core";
|
import {
|
||||||
|
getInput,
|
||||||
|
setOutput,
|
||||||
|
setFailed,
|
||||||
|
warning,
|
||||||
|
getBooleanInput,
|
||||||
|
} from "@actions/core";
|
||||||
import runAction from "./action.js";
|
import runAction from "./action.js";
|
||||||
|
|
||||||
if (!process.env.RUNNER_TEMP) {
|
if (!process.env.RUNNER_TEMP) {
|
||||||
|
@ -35,7 +41,7 @@ runAction({
|
||||||
customUrl: getInput("bun-download-url") || undefined,
|
customUrl: getInput("bun-download-url") || undefined,
|
||||||
registryUrl: getInput("registry-url") || undefined,
|
registryUrl: getInput("registry-url") || undefined,
|
||||||
scope: getInput("scope") || undefined,
|
scope: getInput("scope") || undefined,
|
||||||
disableCache: getInput("disable-cache") || undefined,
|
disableCache: getBooleanInput("disable-cache") || undefined,
|
||||||
})
|
})
|
||||||
.then(({ version, revision, cacheHit }) => {
|
.then(({ version, revision, cacheHit }) => {
|
||||||
setOutput("bun-version", version);
|
setOutput("bun-version", version);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue