Skip to content

CICDL-336: route bun install through internal npm proxy#5

Open
Moser-ss wants to merge 5 commits into
mainfrom
CICDL-336-fix-bun-registry-global-config
Open

CICDL-336: route bun install through internal npm proxy#5
Moser-ss wants to merge 5 commits into
mainfrom
CICDL-336-fix-bun-registry-global-config

Conversation

@Moser-ss
Copy link
Copy Markdown

@Moser-ss Moser-ss commented May 27, 2026

Problem

On `eks-runner-ai`, a hostAlias redirects `registry.npmjs.org` to `0.0.0.0`, blocking all npm package downloads. This caused two failures:

  1. Install Bun step — `setup-bun` tries to download the bun binary, which may hit blocked URLs
  2. Install Dependencies step — `bun install` connects to `registry.npmjs.org` to download packages

Solution

  • Default `path_to_bun_executable` to `/usr/local/bin/bun` — skips `setup-bun` entirely on runners where bun is pre-installed, avoiding the binary download problem
  • Pass `--registry=https://npm-registry-proxy.pipedrive.tools\` to `bun install --production` — routes package downloads through the internal proxy instead of `registry.npmjs.org`

Note: the `registries` input on `setup-bun` was attempted but doesn't work due to a bug in `setup-bun`: it writes `bunfig.toml` to `cwd()` (workspace root) instead of `~/.bunfig.toml`, so the config is never picked up by `bun install` running from the action directory.

Test

Verified working in: https://github.com/pipedrive/hal/actions/runs/26518847219/job/78105177087
Test workflow: https://github.com/pipedrive/hal/actions/runs/26518847219/workflow

🤖 Generated with Claude Code

Moser-ss and others added 5 commits May 27, 2026 12:47
…gh proxy

registry.npmjs.org is blocked (0.0.0.0) on eks-runner-ai via hostAlias.
bun respects the npm_config_registry env var, so setting it on the
install step avoids any config file resolution order issues.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
registry.npmjs.org is blocked (0.0.0.0) on eks-runner-ai via hostAlias.
using --registry flag is more explicit than env var and scoped to this
single command.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…bug)

setup-bun writes bunfig.toml to cwd() (workspace root) instead of
~/.bunfig.toml, so the registry config was never picked up by bun
install running from the action directory.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
skips setup-bun entirely on runners where bun is pre-installed at
this path, avoiding the need to download or install bun.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants