Adding bun-base-url option
This commit is contained in:
parent
635640504f
commit
ce5c2f21f9
@ -71,6 +71,7 @@ If you need to override the download URL, you can use the `bun-download-url` inp
|
|||||||
| `bun-version` | The version of Bun to download and install. | `latest` | `canary`, `1.0.0` |
|
| `bun-version` | The version of Bun to download and install. | `latest` | `canary`, `1.0.0` |
|
||||||
| `bun-version-file` | The version of Bun to download and install from file. | `undefined` | `package.json`, `.bun-version`, `.tool-versions` |
|
| `bun-version-file` | The version of Bun to download and install from file. | `undefined` | `package.json`, `.bun-version`, `.tool-versions` |
|
||||||
| `bun-download-url` | URL to download .zip file for Bun release | | |
|
| `bun-download-url` | URL to download .zip file for Bun release | | |
|
||||||
|
| `bun-base-url` | Base URL to download for Bun | | `"https://bun.sh"` |
|
||||||
| `registry-url` | Registry URL where some private package is stored. | `undefined` | `"https://npm.pkg.github.com/"` |
|
| `registry-url` | Registry URL where some private package is stored. | `undefined` | `"https://npm.pkg.github.com/"` |
|
||||||
| `scope` | Scope for private packages. | `undefined` | `"@foo"`, `"@orgname"` |
|
| `scope` | Scope for private packages. | `undefined` | `"@foo"`, `"@orgname"` |
|
||||||
|
|
||||||
|
|||||||
@ -17,6 +17,9 @@ inputs:
|
|||||||
bun-download-url:
|
bun-download-url:
|
||||||
description: Override the URL to download Bun from. This skips version resolution and verifying AVX2 support.
|
description: Override the URL to download Bun from. This skips version resolution and verifying AVX2 support.
|
||||||
required: false
|
required: false
|
||||||
|
bun-base-url:
|
||||||
|
description: Base URL to download Bun releases from.
|
||||||
|
required: false
|
||||||
registries:
|
registries:
|
||||||
description: |
|
description: |
|
||||||
List of package registries with authentication support. Format:
|
List of package registries with authentication support. Format:
|
||||||
|
|||||||
58
dist/setup/index.js
generated
vendored
58
dist/setup/index.js
generated
vendored
File diff suppressed because one or more lines are too long
@ -19,6 +19,7 @@ import { cwd } from "node:process";
|
|||||||
|
|
||||||
export type Input = {
|
export type Input = {
|
||||||
customUrl?: string;
|
customUrl?: string;
|
||||||
|
baseUrl?: string;
|
||||||
version?: string;
|
version?: string;
|
||||||
os?: string;
|
os?: string;
|
||||||
arch?: string;
|
arch?: string;
|
||||||
@ -168,7 +169,7 @@ function getDownloadUrl(options: Input): string {
|
|||||||
const eprofile = encodeURIComponent(profile ?? false);
|
const eprofile = encodeURIComponent(profile ?? false);
|
||||||
const { href } = new URL(
|
const { href } = new URL(
|
||||||
`${eversion}/${eos}/${earch}?avx2=${eavx2}&profile=${eprofile}`,
|
`${eversion}/${eos}/${earch}?avx2=${eavx2}&profile=${eprofile}`,
|
||||||
"https://bun.sh/download/",
|
`${options.baseUrl ?? "https://bun.sh"}/download/`,
|
||||||
);
|
);
|
||||||
return href;
|
return href;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -28,6 +28,7 @@ runAction({
|
|||||||
readVersionFromFile(getInput("bun-version-file")) ||
|
readVersionFromFile(getInput("bun-version-file")) ||
|
||||||
undefined,
|
undefined,
|
||||||
customUrl: getInput("bun-download-url") || undefined,
|
customUrl: getInput("bun-download-url") || undefined,
|
||||||
|
baseUrl: getInput("bun-base-url"),
|
||||||
registries: registries,
|
registries: registries,
|
||||||
noCache: getBooleanInput("no-cache") || false,
|
noCache: getBooleanInput("no-cache") || false,
|
||||||
})
|
})
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user