Skip to content

CI: pull shared build image instead of building locally#15

Merged
tamnd merged 1 commit into
mainfrom
refactor/shared-docker-image
Apr 19, 2026
Merged

CI: pull shared build image instead of building locally#15
tamnd merged 1 commit into
mainfrom
refactor/shared-docker-image

Conversation

@tamnd

@tamnd tamnd commented Apr 19, 2026

Copy link
Copy Markdown
Owner

Summary

  • Replace the local Dockerfile.vi build with docker pull ghcr.io/tamnd/beej-vi-docker:latest in both deploy.yml and release.yml.
  • Delete Dockerfile.vi from this repo. The image now lives in tamnd/beej-vi-docker and is shared across all translation repos.
  • Update scripts/build_vi_docker.sh to pull the shared image rather than build locally.

Why

The previous setup rebuilt the same texlive-full image in every Beej translation repo. cache-from: type=gha helped after the first run on a branch, but:

  • GitHub Actions caches are scoped per repository, so fresh branches (and fresh repos like bgc-vi) paid ~13 minutes for a cold texlive-full install.
  • Keeping identical Dockerfile.vi in sync across bgnet-vi, bgc-vi, and any future translation repo was a copy-paste chore.

Now every guide pulls one shared image. Cold pull is ~30 seconds; warm is a layer cache hit.

Test plan

  • CI build job on this PR completes without the old buildx / build-push-action steps
  • Build time on the PR drops from ~13 minutes to a few minutes (dominated by xelatex, not image build)
  • PDF/HTML/EPUB artifacts in the workflow artifact match what main currently produces
  • After merge, GitHub Pages deploy still works end-to-end
  • Tag-triggered release workflow smoke test: cut a dry-run pre-release tag if needed to confirm

Both deploy and release workflows used to buildx the TeX Live image on
every job, with gha cache smoothing over the worst of it. That cache
is scoped per-repo, so fresh branches paid ~13 min to install
texlive-full from scratch.

Switch to pulling ghcr.io/tamnd/beej-vi-docker:latest, a shared image
maintained in tamnd/beej-vi-docker. Cold pull is ~30 s, no gha cache
bookkeeping, no Dockerfile.vi to keep in sync across translation
repos.
@tamnd tamnd merged commit df71258 into main Apr 19, 2026
2 checks passed
@tamnd tamnd deleted the refactor/shared-docker-image branch April 19, 2026 14:18
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.

1 participant