Repository navigation
CI: only main writes the Rust cache; prebuilt images on ghcr.io for deploys - #86
Merged
Merged
Conversation
Pull requests restore main's cache and no longer save their own.
image workflow (cargo-chef, BuildKit gha cache, attestation), update.sh --image, docs and ADR 0007.
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.
Two things in one PR (the cache hygiene of step 2 and the prebuilt images of step 6).
Cache hygiene
save-if: ${{ github.ref == 'refs/heads/main' }}on everySwatinem/rust-cachestep (ci, fuzz, network-drift); keys unchanged. The repo held 11.95 GB of the 10 GB limit. Done once, outside the diff: deleted the two stale PR-ref entries of merged PRs 62 and 66 (ids 9474471456, 9472826709; listed first, deleted exactly those). Note for the operator: main still holds older duplicates (the...-bd87e271keys: postgres 0.9, Windows 1.8, Linux 1.4 GB, superseded by...-037dd366); I left them, they are main-ref entries and will age out.Prebuilt images (ADR 0007, docs/deploy.md)
deploy/Dockerfile: cargo-chef (0.1.78, pinned):planner->cook(dependency layer) ->build. A source change compiles only the sources. The base image pin is unchanged.image.yml: on every merge tomainbuilds thecloudandrelaytargets with BuildKit (type=gha, scope per image), pushesghcr.io/anyplaynet/cloud:<sha>+:mainand.../relay:<sha>+:mainwith SBOM and provenance, and attests each digest withactions/attest-build-provenance. The job summary prints the exactupdate.shcommand. On PRs touching the Dockerfile the same build runs without pushing (this PR'simagecheck).ci.ymldockerandkubernetes.ymlkindnow build with the same action and read main's BuildKit cache (read only), so PR image builds start from the cached dependency layer once main has written it. Job and check names unchanged.deploy/compose.yaml: explicitimage: anyplay-cloud|relay|caddy(the names compose derived before, so nothing changes for a build).deploy/update.sh --cloud <commit> --image sha256:... --relay-image sha256:... [--no-attestation]: pulls both images by digest instead of building them; refuses (running version untouched) when the pull fails, when an image'sorg.opencontainers.image.revisionlabel is not the cloud commit, or whengh attestation verifyrejects it (ifghis there). Caddy/web still build locally. Backup, rollback tags, health check and rollback are unchanged; the old build path is the fallback when--imageis absent. Pulled images are taggedanyplay-cloud/anyplay-relayonly right beforeup, so a failed pull, check or backup leaves the old tags alone.Time, old -> expected
imagejob 9:46 (cloud image about 5 min of it, the rest cache export and the relay target);dockerjob 5:03 for the cloud image cold. The warm number (dependency layer from cache) is not measured yet; first main run writes the cache. Expected 1.5-3 min once warm.checkcold 10:48-11:34 vs warm).Not run
Nothing was run against the server. The push/attest steps of
image.ymlcannot run on a PR; the first run on main is their test (check the job summary andgh attestation verify oci://ghcr.io/anyplaynet/cloud@<digest> --repo anyplaynet/cloud).update.sh --imageis only syntax-checked and run for its argument errors here (Docker is not allowed on this PC);shellCI passes (shellcheck).