[autofix.ci] apply automated fixes

This commit is contained in:
autofix-ci[bot] 2024-04-12 06:57:01 +00:00 committed by GitHub
parent ada22be84e
commit 132ee5cf36
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 44 additions and 47 deletions

View file

@ -15,7 +15,7 @@ Download, install, and setup [Bun](https://bun.sh) in GitHub Actions.
```yaml ```yaml
- uses: oven-sh/setup-bun@v1 - uses: oven-sh/setup-bun@v1
with: with:
bun-version-file: '.bumrc' bun-version-file: ".bumrc"
``` ```
### Using a custom NPM registry ### Using a custom NPM registry
@ -42,13 +42,13 @@ In most cases, you shouldn't need to use the [setup-node](https://github.com/act
## Inputs ## Inputs
| Name | Description | Default | Examples | | Name | Description | Default | Examples |
| ------------------- | ------------------------------------------------------ | ----------- | ------------------------------- | | ------------------ | ----------------------------------------------------- | ----------- | ------------------------------- |
| `bun-version` | The version of Bun to download and install. | `latest` | `canary`, `1.0.0`, `1.0.x` | | `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` | | `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/"` | | `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"` |
| `no-cache` | Disable caching of the downloaded executable. | `false` | `true`, `false` | | `no-cache` | Disable caching of the downloaded executable. | `false` | `true`, `false` |
## Outputs ## Outputs

64
dist/setup/index.js generated vendored

File diff suppressed because one or more lines are too long

View file

@ -89,11 +89,11 @@ function readVersionFromFile(): string | undefined {
} }
if (file === "package.json") { if (file === "package.json") {
return readVersionFromPackageJson(file) return readVersionFromPackageJson(file);
} else if (file === ".tool-versions") { } else if (file === ".tool-versions") {
return readVersionFromToolVersions(file) return readVersionFromToolVersions(file);
} else if (file === ".bumrc") { } else if (file === ".bumrc") {
return readVersionFromBumrc(file) return readVersionFromBumrc(file);
} else { } else {
warning(`Not allowed read version from ${file}`); warning(`Not allowed read version from ${file}`);
} }
@ -104,10 +104,7 @@ function readVersionFromFile(): string | undefined {
} }
runAction({ runAction({
version: version: getInput("bun-version") || readVersionFromFile() || undefined,
getInput("bun-version") ||
readVersionFromFile() ||
undefined,
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,