Add CI workflow that builds the podman image#1
Merged
Merged
Conversation
Adds a GitHub Actions workflow that builds the container image with podman on push to master, pull requests, and manual dispatch. On master it also populates a registry-backed layer cache and pushes the image (and tools image) to GHCR via the built-in GITHUB_TOKEN; PR/manual runs build only. podman has no GHA cache backend, so cross-run caching uses --cache-to/ --cache-from against ghcr.io/<repo>/buildcache, keeping the expensive TDLib/tgcalls/WebRTC layers warm between runs. Also fixes the Containerfile, which never copied video_platform.cpp after 935f6a7 added it to the tgcalls target in CMakeLists.txt, so `make image` was already broken. Copied after the TDLib build so editing it doesn't bust the cached TDLib layer. The Makefile gains an IMAGE_BUILD_ARGS hook so CI injects the cache flags through `make image`/`make push` without diverging from the local build command. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
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.
Adds a GitHub Actions workflow that builds the container image with podman and fixes the image build, which was already broken on
master.What's here
.github/workflows/build-image.yml(new)master, pull requests, and manual dispatch.make imagewith--layers --cache-from— build-only, no push.make pushwith--layers --cache-from --cache-to— builds, populates the registry cache, and pushes the image + tools image toghcr.io/nikicat/tg-echo-service.GITHUB_TOKEN(no secrets to add). Includes recursive submodule checkout, a disk-cleanup step (the WebRTC build is large),concurrencycancel of superseded runs, and a 6h timeout.Containerfile— addsCOPY video_platform.cpp .. Commit935f6a7added that file to thetgcallstarget inCMakeLists.txtbut never to theContainerfile, somake imagefailed at configure time. Placed after the TDLib build so editing it doesn't bust the cached TDLib layer.Makefile— adds anIMAGE_BUILD_ARGS ?=hook injected into theimagetarget'spodman build. Empty for localmake image; CI passes the cache flags through it, so the build command stays single-sourced.Why registry cache (not
type=gha)podman has no GHA cache backend; cross-run caching is registry-backed only (podman ≥4.2
--cache-to/--cache-from). Since we already push to GHCR, the cache lives atghcr.io/nikicat/tg-echo-service/buildcacheand keeps the expensive TDLib/tgcalls/WebRTC layers warm between runs.Notes
masterrun is a cold build (no cache yet) and creates the GHCR packages (private by default — flip to public in repo settings to allow anonymous pulls).Containerfilefix is from static analysis of the CMake source list, and this workflow run is the end-to-end check.🤖 Generated with Claude Code