mirror of
https://github.com/oven-sh/setup-bun.git
synced 2025-07-18 04:28:28 +02:00
[autofix.ci] apply automated fixes
This commit is contained in:
parent
ada22be84e
commit
132ee5cf36
3 changed files with 44 additions and 47 deletions
|
@ -15,7 +15,7 @@ Download, install, and setup [Bun](https://bun.sh) in GitHub Actions.
|
|||
```yaml
|
||||
- uses: oven-sh/setup-bun@v1
|
||||
with:
|
||||
bun-version-file: '.bumrc'
|
||||
bun-version-file: ".bumrc"
|
||||
```
|
||||
|
||||
### Using a custom NPM registry
|
||||
|
@ -43,7 +43,7 @@ In most cases, you shouldn't need to use the [setup-node](https://github.com/act
|
|||
## Inputs
|
||||
|
||||
| Name | Description | Default | Examples |
|
||||
| ------------------- | ------------------------------------------------------ | ----------- | ------------------------------- |
|
||||
| ------------------ | ----------------------------------------------------- | ----------- | ------------------------------- |
|
||||
| `bun-version` | The version of Bun to download and install. | `latest` | `canary`, `1.0.0`, `1.0.x` |
|
||||
| `bun-version-file` | The version of Bun to download and install from file. | `undefined` | `.bumrc` |
|
||||
| `registry-url` | Registry URL where some private package is stored. | `undefined` | `"https://npm.pkg.github.com/"` |
|
||||
|
|
64
dist/setup/index.js
generated
vendored
64
dist/setup/index.js
generated
vendored
File diff suppressed because one or more lines are too long
11
src/index.ts
11
src/index.ts
|
@ -89,11 +89,11 @@ function readVersionFromFile(): string | undefined {
|
|||
}
|
||||
|
||||
if (file === "package.json") {
|
||||
return readVersionFromPackageJson(file)
|
||||
return readVersionFromPackageJson(file);
|
||||
} else if (file === ".tool-versions") {
|
||||
return readVersionFromToolVersions(file)
|
||||
return readVersionFromToolVersions(file);
|
||||
} else if (file === ".bumrc") {
|
||||
return readVersionFromBumrc(file)
|
||||
return readVersionFromBumrc(file);
|
||||
} else {
|
||||
warning(`Not allowed read version from ${file}`);
|
||||
}
|
||||
|
@ -104,10 +104,7 @@ function readVersionFromFile(): string | undefined {
|
|||
}
|
||||
|
||||
runAction({
|
||||
version:
|
||||
getInput("bun-version") ||
|
||||
readVersionFromFile() ||
|
||||
undefined,
|
||||
version: getInput("bun-version") || readVersionFromFile() || undefined,
|
||||
customUrl: getInput("bun-download-url") || undefined,
|
||||
registryUrl: getInput("registry-url") || undefined,
|
||||
scope: getInput("scope") || undefined,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue