Repository navigation
ci(studio-pack): publish the studio pack as a pinned OCI image - #1
Merged
Merged
Conversation
workflow_dispatch with a full commit sha (reachable from develop or main) builds the pack from git archive <commit> with a digest-pinned Dockerfile that mirrors scripts/studio-pack.sh, and pushes ghcr.io/univers42/graph-studio-pack:sha-<commit> (FROM scratch, /pack/). Nothing is pushed unless a --no-cache rebuild and the commit's own studio-pack.sh produce byte-identical packs. Additive: no existing file changes.
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.
Draft. Not for merge yet, and nothing gets dispatched or published from this PR.
Heads-up @LESdylan: this is additive packaging only. It adds 3 new files and changes no existing file, engine code or workflow.
What it adds
.github/workflows/studio-pack.ymlruns onworkflow_dispatchonly. Its one input iscommit, which must be a full lowercase 40-hex sha reachable fromorigin/developororigin/main. It publishesghcr.io/univers42/graph-studio-pack:sha-<commit>. There is no:latest, and a tag that already exists fails the run. Permissions arecontents: readandpackages: write, and the only secret isGITHUB_TOKEN.packaging/studio-pack.Dockerfilebuilds aFROM scratchimage with the six pack files under/pack/. Labels:org.opencontainers.image.{revision,source,created}, plusorg.univers42.graph-studio-pack.recipe-rev(the workflow's own sha). Base images are pinned by digest:debian:trixie-slim@sha256:a99cfc51…andnode:22.23.3-slim@sha256:43ac6c60…. rustup-init 1.29.1 is sha256-checked and installs Rust 1.98.1.packaging/studio-pack-manifest.shwritespack.jsonand verifies it. It portsscripts/studio-pack.sh'swrite_manifestand verify (same line format), runs the commit's ownscripts/worker-form.sh, and checks that the pack has exactly the six files.The build context is
git archive <commit>, so the workflow can pack commits older than itself, such as 77b68d9. The Dockerfile mirrorsstudio-pack.shrather than running it. That script starts docker itself and builds ge-rustFROM debian:trixie-slimwithout a digest.Gates before anything is pushed
studio-pack.sh,wasm-threads.sh,rust.Dockerfile,wasm-threads.Dockerfileandvite.pack.config.tsmust equal their values at 77b68d9. Also,studio.sh'sbuild_wasmline must be unchanged andimage.sh's node pin must match.--no-cache, must give byte-identical packs (diff -r).scripts/studio-pack.shoutput (diff -r)./packmust equal build 1.The job summary lists the commit, recipe_rev,
image@digest, and the bytes and sha256 of each file.Local evidence (77b68d9, no push)
--no-cacherebuild: 74 s, using a 3 GB-capped BuildKit builder on 6 cores.diff -rA vs B exits 0.scripts/studio-pack.sh target/packon a clean detached worktree took 145 s.diff -rof its output against the Dockerfile's pack exits 0.graph_wasm.wasmwas 377 bytes longer. Withrust-srcinstalled, rustc embedded/opt/rustup/…/library/…panic paths instead of/rustc/48a229ce…/. That is whyrust-srcnow exists only in the threads stage, matching upstream's ge-rust / ge-wasm-threads split.Known limits and open items
GITHUB_TOKENfor a package that does not exist yet has not been verified.GITHUB_TOKENcreate a new package. A new GHCR package is private by default.Merge policy: merge commit (
--merge), branch deleted after merge.