Skip to content

feat(build/bake): compression inputs for image output - #333

Open
onedr0p wants to merge 1 commit into
docker:mainfrom
onedr0p:build-bake-compression
Open

onedr0p wants to merge 1 commit into
docker:mainfrom
onedr0p:build-bake-compression

Conversation

@onedr0p

@onedr0p onedr0p commented Nov 3, 2026 •

Copy link
Copy Markdown

fixes #207

Add compression, compression-level, and force-compression inputs to the build and bake workflows. Each input sets the attribute of the same name on the BuildKit image exporter. The prepare job makes sure that compression is uncompressed, gzip, estargz, or zstd, and that compression-level contains only digits. Because of this, the inputs cannot add other attributes to the exporter. The inputs apply only to output: image. For output: local, the workflow ignores valid values and logs a warning.

The new test jobs build test/compression.Dockerfile, which keeps the gzip base layer of alpine. If force-compression does not convert that layer, the test fails. These jobs push only on events other than pull_request, so I ran the same builds from my fork: https://github.com/onedr0p/github-builder/actions/runs/41712959010. I turned off signing there, because the signing step expects the identity of this repository. With force-compression, all layers were zstd. Without it, the alpine layer stayed gzip. With the default values, all layers stayed gzip.

Signed-off-by: Devin Buhl <devin@buhl.casa>
@onedr0p
onedr0p force-pushed the build-bake-compression branch from 1239c61 to db1823b Compare November 3, 2026 21:20
@onedr0p onedr0p changed the title build/bake: compression inputs for image output feat: build/bake: compression inputs for image output Nov 3, 2026
@onedr0p onedr0p changed the title feat: build/bake: compression inputs for image output feat(build/bake): compression inputs for image output Nov 3, 2026

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add support for compression settings in bake action

1 participant