Repository navigation
build: publish a FROM scratch artifact image of the built CLI, add fork CI - #5
Merged
Merged
Conversation
…rk CI Containerfile.artifact builds the CLI in a digest-pinned hi/nodejs:22 builder (npm ci from the shrinkwrap, npm run build), packs it with npm pack so .npmignore stays the single definition of the shipped file set, then npm-installs that tarball into the global prefix /opt/m365. The result is a FROM scratch image containing only that prefix, with npm's own bin link at /opt/m365/bin/m365. Consumers such as rh-forge/openclaw-saw-image inline it with a digest-pinned COPY --from instead of npm-installing this fork from git inside their own builds, which also gives them the shrinkwrap-pinned dependency set they never had before. Every install step runs with --ignore-scripts: nothing in the tree needs an install hook, and it keeps the "prepare" build hook (added for the git-install path, now redundant) from firing before sources are copied. The publish workflows are the organisation's standard set (publish-image, publish-pr-image via workflow_run, cleanup-pr-image, prune-images) with two deliberate differences for an artifact that downstream pins by digest: sha-<commit> tags are immutable (a guard refuses to republish a commit whose sha- tag already exists), and there is no semver/tag trigger. ci.yml is new: every workflow inherited from upstream is gated on repository_owner == 'pnp' and never runs here, so until now this fork shipped a production binary with no CI at all. It runs the build, lint, and unit tests on the same Node major the artifact is built with. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
The fork relaxed `outlook event list` so that omitting both userId and
userName falls back to /me, and flipped the corresponding validation test
from "fails" to "passes". The test's input, `{ id: calendarId }`, was
never a valid option: the schema is a strictObject and `id` is unknown,
which is the only reason upstream's negative version of the test passed.
With the assertion flipped, the unknown key made it fail. Use the real
option name, calendarId.
Surfaced by the fork CI added in this PR; the full suite now passes
(16068 tests).
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Publishes this fork's build output as a minimal artifact image,
ghcr.io/rh-forge/m365-cli, sorh-forge/openclaw-saw-imagecan inline the CLI with a digest-pinnedCOPY --frominstead of npm-installing the fork from git inside its own build. Consumer side: rh-forge/openclaw-saw-image#25.What's in it
Containerfile.artifact: digest-pinnedhi/nodejs:22-builderstage runsnpm cifrom the shrinkwrap,npm run build,npm pack, thennpm install --global --prefix /opt/m365 <tarball>. The final stage isFROM scratchcontaining only/opt/m365, with npm's own bin link at/opt/m365/bin/m365. Notardependency (the arm64 builder has none), no manualchmod. Every install step uses--ignore-scripts, which also neutralises thepreparehook that only existed for the git-install path.publish-image,publish-pr-imageviaworkflow_run,cleanup-pr-image,prune-images), with two deliberate differences for an artifact that consumers pin by digest:sha-<commit>tags are immutable (a guard refuses to republish an existing one), and there is no semver/tag trigger. Each push run writes the ready-to-pastetag@digestpin to the job summary.ci.yml: new. Every workflow inherited from upstream is gated onrepository_owner == 'pnp'and never runs here, so until now this fork had no CI. Runs build, lint, and unit tests on Node 22.Verified locally
Built natively on arm64 and exercised through a
ubi9/nodejs-22-minimalconsumer stage:m365 version→v11.11.0,--helprenders (docs/docs/cmdships), the bin link resolves todist/index.jsunder the prefix, nosrc/in the tree. CI buildslinux/amd64.Follow-ups (separate PRs)
preparehook (revert c652ffb) once openclaw-saw-image has switched.m365-clipackage topackage-permsand grantopenclaw-saw-imageread (manual GHCR UI step).🤖 Generated with Claude Code