ci: report image size changes on image PRs - #306
Conversation
On pull requests, each image build matrix now measures the new image's size and compares it against the currently published rolling tag for the same runtime version (e.g. apify/actor-node:22), uploading a per-image report. A new size-report job aggregates those reports and posts/updates a single sticky comment per workflow with a current/new/Δ table. The Markdown is rendered by a TypeScript script run natively on Node.js 24 (type stripping, no build step). Applies to all six image workflows (node, node-playwright, node-puppeteer, python, python-playwright, python-selenium).
📦 Image size reportBuilt images compared against the currently published rolling tag for the same runtime version (e.g.
|
📦 Image size reportBuilt images compared against the currently published rolling tag for the same runtime version (e.g.
|
📦 Image size reportBuilt images compared against the currently published rolling tag for the same runtime version (e.g.
|
The node workflows' measure step now records the slim image alongside the regular one (baseline: the published rolling tag + -slim), and the report renderer surfaces an explicit variant label next to the matrix-derived one. Python workflows are unchanged as they have no slim variants.
📦 Image size reportBuilt images compared against the currently published rolling tag for the same runtime version (e.g.
|
Instead of one sticky comment per workflow (up to 6 on a wide PR), all image workflows now upsert their own marker-delimited <details> section into a single shared comment. The size-report jobs share a repo-wide concurrency group so concurrent read-modify-writes of the comment cannot drop sections. Sections only appear for workflows the PR's changed paths actually triggered, and each is stamped with the head SHA it measured.
📦 Image size reportBuilt images compared against the currently published rolling tag for the same runtime version (e.g.
|
📦 Image size reportBuilt images compared against the currently published rolling tag for the same runtime version (e.g. Node basic images — 6 images (at 1324b28)
Python basic images — 5 images (at 1324b28)
Python + Selenium images — 5 images (at 1324b28)
Node + Puppeteer images — 6 images (at 1324b28)
Python + Playwright images — 25 images (at 1324b28)
Node + Playwright images — 30 images (at 1324b28)
|
📦 Image size reportBuilt images compared against the currently published rolling tag for the same runtime version (e.g.
|
|
@vladfrangu Nice! This measures only the base images themselves, right? It would be good in 2nd version of this for each base image to add an accompanying actor template and then measure the size of the whole build. E.g. the npm cache thing was only visible in the child image but the problem came from parent. |
On image PRs, each triggered build workflow measures the uncompressed size of the images it built (regular and
-slimfor node), compares them with the published rolling tags, and reports into one shared sticky comment with a foldable section per workflow. Logic is ported fromfeat/central-pm-caches, where it ran on real PRs across all 6 workflows.[🤖] Claude Code using Fable 5.1