Repository navigation
BUILD-13251: Add config-bun action - #369
Conversation
b72e973 to
6a7e207
Compare
6a7e207 to
5e2b1b5
Compare
Configure Bun to resolve npm packages from the Repox selected by repox-url (SaaS on GitHub-hosted runners, production Edge on self-hosted runners) with the matching Vault reader token, exported through BUN_CONFIG_REGISTRY and BUN_CONFIG_TOKEN. Bun keeps absolute tarball URLs in bun.lock, so by default the action makes Repox tarball URLs registry-relative and warns when it had to rewrite the lockfile. It also caches the Bun install cache.
5e2b1b5 to
01319d7
Compare
Code Review ✅ Approved 2 closed / 2 findings🟡 Medium risk · The new config-bun action exports Repox reader credentials to workflow steps, which could expose package access if a consuming workflow mishandles them. Adds a ✅ 2 closed✅ Edge Case: NPM_CONFIG_REGISTRY points npm at Repox with no npm credentials
✅ Quality: PR description still promises bun.lock normalization this commit removed
Verification Rules 2/2 met Repos 1 inspectedFunctional validation No results Rules 2 passed 1 not applicable
Broader impact Repos 1 inspectedCross-repo 1 repository inspected 0 open impacts
Auto-approval Not enabledFor more verification details, comment OptionsAuto-apply is off → Gitar will not commit updates to this branch. Comment with these commands to change the behavior for this request:
Was this helpful? React with 👍 / 👎 | Gitar |
|



BUILD-13251: Add a
config-bunaction so Bun projects resolve npm packages from Repox the same way the otherconfig-*actions do, instead of each repo fetching readers and selecting registries inline.repox-urldefault, so SaaS on GitHub-hosted runners and the production Edge on self-hosted runners. It fetches the matching Vault reader with the same role and engine logic asconfig-npmandconfig-uv.BUN_CONFIG_REGISTRYandBUN_CONFIG_TOKEN, plusARTIFACTORY_USERNAMEandARTIFACTORY_ACCESS_TOKEN. Bun applies these afterbunfig.tomland.npmrc, so they replace the default registry and token those files set (.npmrc support).bun.lock. Bun downloads locked packages from the absolute tarball URLs inbun.lockand writes registry-relative entries only forregistry.npmjs.org(oven-sh/bun#45250). Consumers must commit abun.lockresolved through the same Repox asrepox-url. The README documents this.~/.bun/install/cache, keyed onbun.lock.disable-caching: trueturns it off.bun ci, or claim a build number.Test plan:
setup-buncalledconfig-bun@feat/hnasr/BUILD-13251-configBunwithrepox-url: https://repox-internal.sonar.build, and itsbun.lockpins tarballs to the production Edge.Unit Tests - windows on a self-hosted WarpBuild runner resolved from the Edge:
Sign and Notarize macOS Binaries on a GitHub-hosted macOS runner reached the Edge through Cloudflare WARP (
288 packages installed [11.81s]).Lint, Linux unit tests and Build All Binaries also passed with the Edge reader.