setup-bun/action.yml
Jozef Steinhübl 34f777aec1
feat: support for multiple registries (#109)
* feat: support for multiple registries

* [autofix.ci] apply automated fixes

* refactor: drop unnecessary check

* fix: pass empty array instead undefined

* [autofix.ci] apply automated fixes

* fix: dont add registry set line

* [autofix.ci] apply automated fixes

* feat: few more tests

* feat: add bun types

* docs: explain registries

* feat: save globally

* [autofix.ci] apply automated fixes

* ci: jsr registry test

* ci: add ,

* ci: test

* ci: test

* ci: test

* ci: test

* [autofix.ci] apply automated fixes

* feat: use @iarna/toml

* [autofix.ci] apply automated fixes

* feat: registry parsing

* [autofix.ci] apply automated fixes

* ci: verbose add

* ci: registry install check

* ci: registry install check

* ci: registry install check

* ci: verify registry usage

* docs: registries

* docs: important block

* docs: show table

* docs: show table

* ci: shell

* ci: registry test on linux

* ci: registry test on linux

* build: text lockfile

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2025-07-09 12:22:12 +02:00

60 lines
2.0 KiB
YAML

name: Setup Bun
description: Download, install, and setup Bun to your path.
author: robobun
branding:
icon: play-circle
color: white
inputs:
bun-version:
description: The version of Bun to install. (e.g. "latest", "canary", "1.0.0", "1.0.x", <sha>)
required: false
bun-version-file:
description: The version of Bun to install from file. (e.g. "package.json", ".bun-version", ".tool-versions")
default: null
required: false
bun-download-url:
description: Override the URL to download Bun from. This skips version resolution and verifying AVX2 support.
required: false
registries:
description: |
List of package registries with authentication support. Format:
- Default registry: https://registry.npmjs.org/
- Default with token: https://registry.npmjs.org/|token
- Scoped registry: @scope:https://registry.example.com/
- Scoped with token: @scope:https://registry.example.com/|token
- Scoped with credentials: @scope:https://user:pass@registry.example.com/
required: false
registry-url:
required: false
description: The URL of the package registry to use for installing Bun. Set the $BUN_AUTH_TOKEN environment variable to authenticate with the registry.
deprecationMessage: "Use 'registries' input instead."
scope:
required: false
description: "The scope for authenticating with the package registry."
deprecationMessage: "Use 'registries' input instead."
no-cache:
required: false
type: boolean
default: false
description: Disable caching of bun executable.
outputs:
bun-version:
description: The version of Bun that was installed.
bun-revision:
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:
description: If the version of Bun was cached.
runs:
using: "node20"
main: "dist/setup/index.js"
post: "dist/cache-save/index.js"
post-if: success()