Skip to content

feat(preview): pass an optional npm read token to preview image builds - #157

Merged
armonge merged 1 commit into
mainfrom
feat/preview-npm-token
Oct 29, 2026
Merged

armonge merged 1 commit into
mainfrom
feat/preview-npm-token

Conversation

@armonge

@armonge armonge commented Oct 27, 2026 •

Copy link
Copy Markdown
Contributor

Jira: BE-2928

What

preview.build-image.yaml gets an optional npmGithubReadToken secret, the same name build-image.yaml uses. It reaches the Docker build as the BuildKit secret npm_github_token.

Why

product-api now installs @parcellab/sift from GitHub Packages during the image build (parcelLab/product-api#9554). The Containerfile reads the token from /run/secrets/npm_github_token. Production builds get it through build-image.yaml, but preview builds had no way to pass it, so they fail with cat: can't open '/run/secrets/npm_github_token' (run).

The secret is optional. Callers that don't pass it get an empty npm_github_token secret, which their Containerfiles never mount, so nothing changes for them.

@armonge
armonge requested a review from a team as a code owner October 27, 2026 12:13
Copilot AI balanced review requested due to automatic review settings October 27, 2026 12:13
@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review 🔄 Running since 2026-10-27T12:13:34.451686Z abbfcda PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟢 Approval recommended

The preview-build authentication change has no active review issues.

No open issues 🎉

What changed in this PR

Enables preview image builds to authenticate with GitHub Packages, using the same secret interface as production builds.

Changes:

  • Adds the optional npmGithubReadToken workflow secret.
  • Passes it to Docker builds as the BuildKit secret npm_github_token, allowing Containerfiles to access private npm packages.
File Description
.github/​workflows/​preview.build-image.yaml Declares the optional npm read token and forwards it to the Docker build.

Review effort: Balanced

@armonge
armonge merged commit 419019f into main Oct 29, 2026
10 checks passed
@armonge
armonge deleted the feat/preview-npm-token branch October 29, 2026 10:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants