Repository navigation
Conversation
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.
Summary
Publish the cache-busted web build as a container image,
ghcr.io/soliplex/frontend-web, on each release. Downstream images, such assoliplex-template's nginx image (soliplex/soliplex-template#205), can then
COPY --from=a versioned build instead of building Flutter themselves.Stacked on #614 (cache busting, #612), which this builds on: the image
carries that PR's cache-busted tree. Review and merge #614 first. This PR's
own change is the top commit only.
Changes
Dockerfile:FROM scratch AS webstage holding only/build/web. The nginxstage stays last, so
docker build .still produces the runnable image.--platform=$BUILDPLATFORM. The output is staticfiles, so a multi-platform build runs Flutter once, with no emulation.
FLUTTER_BUILD_ARGSarg, which now adds--no-web-resources-cdn, so CanvasKit is bundled rather than loaded fromGoogle's CDN.
.github/workflows/image.yaml, run onrelease: published, or manuallywith a release
tag:v0.109.0+95to image tags0.109.0,0.109.0-95,0.109, andlatest(+isn't valid in an OCI tag). The full tag is kept in theorg.opencontainers.image.versionlabel.--target webforlinux/amd64andlinux/arm64, withRELEASE_HASHset to the release tag.floating: true, doesn't move0.109orlatest, so republishing an old release can't pull thembackwards.
flutter.yaml.AGENTS.md: the CI section mentions the new workflow.Test Plan
actionlintand markdownlint (via their container images): nofindings. pre-commit YAML, merge-conflict, and gitleaks hooks pass.
v0.109.0+95andv0.109.0, andrejects
v0.109.0-rc1,0.109.0+95, and shell metacharacters.docker-containerbuildx builder:Flutter ran once (amd64), and the
amd64andarm64manifests share oneidentical layer holding the cache-busted tree at
/build/web.requests 200 from
/v0.109.0+95/.workflow_dispatchwith an existing tag is the cheapest first check.frontend-webpackagepublic (
GITHUB_TOKENcan't change visibility).Known limitation (not fixed here):
--no-web-resources-cdnbundlesCanvasKit only. Text fonts still come from
fonts.gstatic.com(the engine'sfontFallbackBaseUrl); the build bundles only MaterialIcons. With external DNSblocked, the client renders icons but no text. #613 overstated the flag on
this point. Fully offline text needs an app change: bundle a font, or self-host
the fallbacks and set
fontFallbackBaseUrl.Related Issues
Closes #613
🤖 Generated with Claude Code