Skip to content

feat(build): expose an npmrc build secret for the botpress-private registry - #143

Merged
pascal-botpress merged 1 commit into
masterfrom
pb/npmrc-build-secret
Sep 17, 2026
Merged

pascal-botpress merged 1 commit into
masterfrom
pb/npmrc-build-secret

Conversation

@pascal-botpress

Copy link
Copy Markdown
Member

This PR adds a new build secret named npmrc to the build/docker, build/depot and build/blacksmith actions, derived from the existing node-auth-token input. Dockerfiles can then mount it on the steps that need access to our private registry:

RUN --mount=type=secret,id=npmrc,target=/root/.npmrc pnpm fetch --frozen-lockfile

BuildKit exposes the file only for that instruction, so the credentials never end up baked in an image layer and the Dockerfile doesn't need to craft the file itself.

To ensure back-compat, the node_auth_token secret is still passed, so Dockerfiles that read it keep working.

…gistry

The three build actions already forward `node-auth-token` to the Docker build as the `node_auth_token` secret, which leaves each Dockerfile to assemble an `.npmrc` from the raw token before running pnpm. To simplify this, the actions now also write a `.npmrc` for the `@botpress-private` registry on the runner and pass it as the `npmrc` secret file, so a Dockerfile can mount it directly with `--mount=type=secret,id=npmrc,target=/root/.npmrc` and nothing is ever written to an image layer. The raw `node_auth_token` secret is still passed, so existing Dockerfiles keep working.
Copilot AI lite review requested due to automatic review settings September 16, 2026 17:45

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@pascal-botpress
pascal-botpress merged commit 6192eeb into master Sep 17, 2026
1 check passed
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.

3 participants