-
Notifications
You must be signed in to change notification settings - Fork 475
Refresh gh-aw-node packages and multi-platform publishing #47405
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -7,14 +7,21 @@ ARG NODE_IMAGE | |
| ARG NODE_IMAGE_DIGEST="" | ||
| ARG NODE_IMAGE_UPDATED_AT="" | ||
| ARG DOCKERFILE_HASH="" | ||
| ARG NPM_VERSION=11.18.0 | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Non-deterministic image builds per architecture: 💡 DetailsOn multi-platform builds the two arch layers are built concurrently from the same manifest but each Mitigate by logging installed packages so diffs are visible in CI output: RUN apk upgrade --no-cache \
&& apk add --no-cache git \
&& apk info -v | sort \
&& npm install --global "npm@${NPM_VERSION}" \
&& npm cache clean --forceLonger term, consider pinning specific Alpine packages or using a custom base image built from a locked apk world.
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Addressed in 65cb3f4 — added |
||
|
|
||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. [/codebase-design] 💡 SuggestionThe resulting image digest is pinned downstream, so this is partially mitigated. Still worth documenting the trade-off explicitly: # Intentional: upgrade all packages to pick up security fixes; downstream digest pins the result.
RUN apk upgrade --no-cache \
&& apk add --no-cache git \
&& npm install --global "npm@${NPM_VERSION}" \
&& npm cache clean --forceAlternatively, consider adding a scheduled rebuild workflow that re-pins the digest on a cadence, making the upgrade step explicit and bounded. @copilot please address this.
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Addressed in 65cb3f4 — added the suggested comment documenting the intentional |
||
| RUN apk add --no-cache git | ||
| # Intentional: upgrade all packages to pick up security fixes; downstream digest pins the result. | ||
| RUN apk upgrade --no-cache \ | ||
| && apk add --no-cache git \ | ||
| && apk info -v | sort \ | ||
| && npm install --global "npm@${NPM_VERSION}" \ | ||
| && npm cache clean --force | ||
|
|
||
| LABEL org.opencontainers.image.source="https://github.com/github/gh-aw" \ | ||
| org.opencontainers.image.description="Node LTS Alpine with git for the local safe-outputs MCP runtime" \ | ||
| org.opencontainers.image.base.name="${NODE_IMAGE}" \ | ||
| org.opencontainers.image.base.digest="${NODE_IMAGE_DIGEST}" \ | ||
| io.github.gh-aw.safe-outputs.node.updated-at="${NODE_IMAGE_UPDATED_AT}" \ | ||
| io.github.gh-aw.safe-outputs.npm.version="${NPM_VERSION}" \ | ||
| io.github.gh-aw.safe-outputs.dockerfile-hash="${DOCKERFILE_HASH}" | ||
|
|
||
| ENTRYPOINT ["sh", "-lc", "node \"${GITHUB_WORKSPACE:-$PWD}/actions/setup/js/safe_outputs_mcp_server.cjs\""] | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed in 11618d1 — added a pinned
docker/setup-qemu-action@v4.2.0step with the sameshould_pushcondition immediately beforesetup-buildx-action.