7676 # (/api/desktop/update) starts offering automatically.
7777 detect-desktop-changes :
7878 name : Detect Desktop Changes
79- runs-on : blacksmith-4vcpu -ubuntu-2404
79+ runs-on : ${{ (vars.CI_PROVIDER == '' || vars.CI_PROVIDER == ' blacksmith') && 'blacksmith-2vcpu -ubuntu-2404' || 'ubuntu-latest' }}
8080 timeout-minutes : 5
8181 if : github.event_name == 'push' && (github.ref == 'refs/heads/dev' || github.ref == 'refs/heads/staging')
8282 outputs :
@@ -165,7 +165,15 @@ jobs:
165165 # build` ~260s). The same `next build` runs on 16 vCPU in the separate
166166 # Build App verification job, which does not gate anything; this one
167167 # was doing comparable work on half the cores.
168+ #
169+ # cache_mb is the layer cache the post-job prune retains, and it is the
170+ # only reason the sticky disks stay bounded — see docker-build's
171+ # action.yml. Rows that omit it take the small-image default there. The
172+ # app image overrides because it carries ~34 layers plus apt and bun
173+ # cache mounts for the whole monorepo; 100 GB is several builds' worth
174+ # of headroom over that working set.
168175 - dockerfile : ./docker/app.Dockerfile
176+ cache_mb : ' 102400'
169177 ecr_repo_secret : ECR_APP
170178 gh_runner : linux-x64-8-core
171179 bs_runner : blacksmith-16vcpu-ubuntu-2404
@@ -176,11 +184,11 @@ jobs:
176184 - dockerfile : ./docker/realtime.Dockerfile
177185 ecr_repo_secret : ECR_REALTIME
178186 gh_runner : ubuntu-latest
179- bs_runner : blacksmith-4vcpu -ubuntu-2404
187+ bs_runner : blacksmith-2vcpu -ubuntu-2404
180188 - dockerfile : ./docker/pii.Dockerfile
181189 ecr_repo_secret : ECR_PII
182190 gh_runner : ubuntu-latest
183- bs_runner : blacksmith-4vcpu -ubuntu-2404
191+ bs_runner : blacksmith-2vcpu -ubuntu-2404
184192 steps :
185193 - name : Checkout code
186194 uses : actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6
@@ -214,6 +222,7 @@ jobs:
214222 file : ${{ matrix.dockerfile }}
215223 platforms : linux/amd64
216224 tags : ${{ steps.login-ecr.outputs.registry }}/${{ steps.ecr-repo.outputs.name }}:dev
225+ max-cache-size-mb : ${{ matrix.cache_mb }}
217226
218227 # Dev: deploy Trigger.dev background tasks to the preview "dev-sim" branch.
219228 # Gated after migrate-dev for the same reason as build-dev — the new task
@@ -280,6 +289,7 @@ jobs:
280289 matrix :
281290 include :
282291 - dockerfile : ./docker/app.Dockerfile
292+ cache_mb : ' 102400'
283293 ghcr_image : ghcr.io/simstudioai/simstudio
284294 ecr_repo_secret : ECR_APP
285295 gh_runner : linux-x64-8-core
@@ -293,12 +303,12 @@ jobs:
293303 ghcr_image : ghcr.io/simstudioai/realtime
294304 ecr_repo_secret : ECR_REALTIME
295305 gh_runner : ubuntu-latest
296- bs_runner : blacksmith-4vcpu -ubuntu-2404
306+ bs_runner : blacksmith-2vcpu -ubuntu-2404
297307 - dockerfile : ./docker/pii.Dockerfile
298308 ghcr_image : ghcr.io/simstudioai/pii
299309 ecr_repo_secret : ECR_PII
300310 gh_runner : ubuntu-latest
301- bs_runner : blacksmith-4vcpu -ubuntu-2404
311+ bs_runner : blacksmith-2vcpu -ubuntu-2404
302312 # No ECR repo is provisioned for cron, so it publishes to GHCR only.
303313 # The tag step below omits the ECR tag when the repo name is empty.
304314 - dockerfile : ./docker/cron.Dockerfile
@@ -382,6 +392,7 @@ jobs:
382392 file : ${{ matrix.dockerfile }}
383393 platforms : linux/amd64
384394 tags : ${{ steps.meta.outputs.tags }}
395+ max-cache-size-mb : ${{ matrix.cache_mb }}
385396
386397 # Promote the sha-tagged ECR images to the deploy tags once tests and
387398 # migrations pass. Pushing the ECR latest/staging tag is what triggers
@@ -484,6 +495,7 @@ jobs:
484495 # hang a release in `queued` rather than fail a PR.
485496 include :
486497 - dockerfile : ./docker/app.Dockerfile
498+ cache_mb : ' 102400'
487499 image : ghcr.io/simstudioai/simstudio
488500 gh_runner : linux-arm64-8-core
489501 bs_runner : blacksmith-8vcpu-ubuntu-2404-arm
@@ -522,6 +534,7 @@ jobs:
522534 file : ${{ matrix.dockerfile }}
523535 platforms : linux/arm64
524536 tags : ${{ matrix.image }}:${{ github.sha }}-arm64
537+ max-cache-size-mb : ${{ matrix.cache_mb }}
525538
526539 # Publish all mutable GHCR tags (latest, latest-amd64/arm64, version tags)
527540 # and the multi-arch manifests from the immutable sha tags — only on main,
@@ -675,7 +688,7 @@ jobs:
675688 # Job-level `if:` cannot read the secrets context, hence the probe job.
676689 check-desktop-signing :
677690 name : Check Desktop Signing Secrets
678- runs-on : blacksmith-4vcpu -ubuntu-2404
691+ runs-on : ${{ (vars.CI_PROVIDER == '' || vars.CI_PROVIDER == ' blacksmith') && 'blacksmith-2vcpu -ubuntu-2404' || 'ubuntu-latest' }}
679692 timeout-minutes : 2
680693 needs : [detect-version, detect-desktop-changes]
681694 # !cancelled(): detect-desktop-changes is skipped on main (and
@@ -724,7 +737,7 @@ jobs:
724737 # remains testable end to end with a manual download.
725738 create-desktop-prerelease :
726739 name : Create Desktop Prerelease
727- runs-on : blacksmith-4vcpu -ubuntu-2404
740+ runs-on : ${{ (vars.CI_PROVIDER == '' || vars.CI_PROVIDER == ' blacksmith') && 'blacksmith-2vcpu -ubuntu-2404' || 'ubuntu-latest' }}
728741 timeout-minutes : 5
729742 needs : [detect-desktop-changes, check-desktop-signing]
730743 # Requires the signing probe to have actually succeeded (not just "not
@@ -813,7 +826,7 @@ jobs:
813826 # point of view.
814827 publish-desktop-prerelease :
815828 name : Publish Desktop Prerelease
816- runs-on : blacksmith-4vcpu -ubuntu-2404
829+ runs-on : ${{ (vars.CI_PROVIDER == '' || vars.CI_PROVIDER == ' blacksmith') && 'blacksmith-2vcpu -ubuntu-2404' || 'ubuntu-latest' }}
817830 timeout-minutes : 5
818831 needs : [create-desktop-prerelease, desktop-prerelease]
819832 permissions :
@@ -837,7 +850,7 @@ jobs:
837850 # are always garbage by this point — the current run's release is published.
838851 prune-desktop-prereleases :
839852 name : Prune Desktop Prereleases
840- runs-on : blacksmith-4vcpu -ubuntu-2404
853+ runs-on : ${{ (vars.CI_PROVIDER == '' || vars.CI_PROVIDER == ' blacksmith') && 'blacksmith-2vcpu -ubuntu-2404' || 'ubuntu-latest' }}
841854 timeout-minutes : 5
842855 needs : [publish-desktop-prerelease]
843856 permissions :
0 commit comments