Stu Mason · Folkestone, Kent
One entryMerged PR· StuMason/laravel-coolify· PHP

PR #107 merged: ci: base images fortnightly + min-mode cache (cut ~2,500 Actions min/month)

additions
+11
deletions
-4
files changed
1

Why

The nightly Build Base Images workflow is the single biggest GitHub Actions consumer across all my repos — ~3,000 Linux minutes/month, roughly the entire monthly allotment. It rebuilds 12 multi-arch images (6 PHP variants × 2 arches) every night for security patches.

It was set up deliberately in #32 (pre-built base images to speed deploys), but nightly is far more aggressive than base-image patching needs.

Changes

  1. Cadence: nightly → fortnightly (0 2 * * *0 2 1,15 * *, 2am on the 1st & 15th). Twice-monthly catches base-image security patches just as well, and any real Dockerfile change still rebuilds immediately via the existing push: docker/base/** trigger.

  2. Cache: mode=maxmode=min. All six base Dockerfiles are single-stage (one FROM), so there are no intermediate build stages for mode=max to cache — it only inflated the per-repo GHA cache. The GHA cache is capped at 10 GB/repo with LRU eviction; twelve mode=max scopes of full PHP+ext(+Node) images blew past the cap, so caches were evicted and nightly runs kept rebuilding cold (plus extra Actions storage billing). mode=min keeps each scope small enough to survive between runs.

Expected saving

~2,500 Actions minutes/month. Real Dockerfile changes and manual workflow_dispatch are unaffected.