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."
|
||||
disable-cache:
|
||||
required: false
|
||||
type: boolean
|
||||
description: "Disable caching of bun executable."
|
||||
outputs:
|
||||
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 { join } from "node:path";
|
||||
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";
|
||||
|
||||
if (!process.env.RUNNER_TEMP) {
|
||||
|
@ -35,7 +41,7 @@ runAction({
|
|||
customUrl: getInput("bun-download-url") || undefined,
|
||||
registryUrl: getInput("registry-url") || undefined,
|
||||
scope: getInput("scope") || undefined,
|
||||
disableCache: getInput("disable-cache") || undefined,
|
||||
disableCache: getBooleanInput("disable-cache") || undefined,
|
||||
})
|
||||
.then(({ version, revision, cacheHit }) => {
|
||||
setOutput("bun-version", version);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue