Publish devcontainer image storage size in prebuild release notes#382
Conversation
|
@copilot can you fix the CI? Build and start task fails with: |
Head branch was pushed to by a user without write access
... Fixed in 1f4c0c3 (latest commit on the branch). Root cause: the devcontainers CLI 0.87.0 cannot parse the combined The image is now pinned by digest only (
... Correction: the fix is commit |
The GHCR package page is the only place to see the devcontainer image size, and it isn't surfaced in the prebuild release notes or artifacts. This adds the compressed, per-platform storage size to the exported release notes and build job summary.
Size is computed in the workflow (not at image build time) since the compressed layer bytes are only known after the manifest is pushed.
Changes
script/devcontainer-image-size.sh(new): Sums OCI config + layer sizes fromdocker manifest inspectto report compressed per-platform download size. Handles multi-arch manifest lists and single-arch images..github/workflows/devcontainer-prebuild.yaml:mergejob now checks out the repo (previously had no checkout) so the script is available.Export devcontainer release notesappends an## Image sizesection to the release notes — uploaded as an artifact and shown in$GITHUB_STEP_SUMMARY..devcontainer/devcontainer.json: Pin the prebuilt image by digest only (ghcr.io/devsecninja/dotfiles-devcontainer@sha256:...) instead of the combined:latest@sha256:...form. The devcontainers CLI 0.87.0 cannot parse a:tag@digestreference (it leaves the tag in the path and fails path validation), which brokedevcontainer upand cascaded into a Feature manifest resolution failure for git-lfs. Digest-only is parseable, keeps the immutable pin, and is stable under Renovate'spinDigests: true.tests/bash/validate-devcontainer.bats): Workflow wiring assertions plus script behavior via a stubbeddocker(per-platform output, header, usage-error path), and a regression test asserting the image is pinned by digest only and guarding against the:tag@digestform returning.docs/installation.mdnote the published size.Example output