mirror of
https://github.com/oven-sh/setup-bun.git
synced 2025-07-18 04:28:28 +02:00
feat: add bun paths and url to output
Fixes https://github.com/oven-sh/setup-bun/issues/81
This commit is contained in:
parent
3458468e4c
commit
ac64dabe8a
3 changed files with 12 additions and 1 deletions
|
@ -27,8 +27,13 @@ outputs:
|
||||||
description: The version of Bun that was installed.
|
description: The version of Bun that was installed.
|
||||||
bun-revision:
|
bun-revision:
|
||||||
description: The revision of Bun that was installed.
|
description: The revision of Bun that was installed.
|
||||||
|
bun-path:
|
||||||
|
description: The path to the Bun executable.
|
||||||
|
bun-download-url:
|
||||||
|
description: The URL from which Bun was downloaded.
|
||||||
cache-hit:
|
cache-hit:
|
||||||
description: If the version of Bun was cached.
|
description: If the version of Bun was cached.
|
||||||
|
|
||||||
runs:
|
runs:
|
||||||
using: "node20"
|
using: "node20"
|
||||||
main: "dist/setup/index.js"
|
main: "dist/setup/index.js"
|
||||||
|
|
|
@ -30,6 +30,8 @@ export type Input = {
|
||||||
export type Output = {
|
export type Output = {
|
||||||
version: string;
|
version: string;
|
||||||
revision: string;
|
revision: string;
|
||||||
|
bunPath: string;
|
||||||
|
url: string;
|
||||||
cacheHit: boolean;
|
cacheHit: boolean;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -111,6 +113,8 @@ export default async (options: Input): Promise<Output> => {
|
||||||
return {
|
return {
|
||||||
version,
|
version,
|
||||||
revision,
|
revision,
|
||||||
|
bunPath,
|
||||||
|
url,
|
||||||
cacheHit,
|
cacheHit,
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
|
@ -17,9 +17,11 @@ runAction({
|
||||||
scope: getInput("scope") || undefined,
|
scope: getInput("scope") || undefined,
|
||||||
noCache: getBooleanInput("no-cache") || false,
|
noCache: getBooleanInput("no-cache") || false,
|
||||||
})
|
})
|
||||||
.then(({ version, revision, cacheHit }) => {
|
.then(({ version, revision, bunPath, url, cacheHit }) => {
|
||||||
setOutput("bun-version", version);
|
setOutput("bun-version", version);
|
||||||
setOutput("bun-revision", revision);
|
setOutput("bun-revision", revision);
|
||||||
|
setOutput("bun-path", bunPath);
|
||||||
|
setOutput("bun-download-url", url);
|
||||||
setOutput("cache-hit", cacheHit);
|
setOutput("cache-hit", cacheHit);
|
||||||
process.exit(0);
|
process.exit(0);
|
||||||
})
|
})
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue