From 50575090ba0de3bc1897ec7e867d33256ab79b88 Mon Sep 17 00:00:00 2001 From: Hamish Fagg Date: Thu, 19 Nov 2026 15:05:41 +1300 Subject: [PATCH] build-image: cache in ECR only Measured on mindshub_frontend's 938 MB build stage: pulling it back took 34s from ECR against 55s from the Actions cache, and exporting it 67s against 167s. The Actions cache added nothing the ECR ref lacks. Co-Authored-By: Claude Fable 5.1 --- build-image/action.yml | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/build-image/action.yml b/build-image/action.yml index 81c0acb..0c5171e 100644 --- a/build-image/action.yml +++ b/build-image/action.yml @@ -12,8 +12,10 @@ # head moves, so the head sha is the stable handle # , latest moved to every build # -# Cache: each build imports from and exports to the GitHub Actions cache -# (scope ) and :buildcache in ECR, mode=max. +# Cache: each build imports from and exports to :buildcache in ECR, +# mode=max. Measured against the GitHub Actions cache on a 938 MB build +# stage, ECR was faster both ways (34s against 55s to pull it back, 67s +# against 167s to export), and it is readable from every branch. inputs: module-name: @@ -102,9 +104,5 @@ runs: BUILD_FOR_ENVIRONMENT=${{ inputs.build-for-environment }} IMAGE_TAG=${{ steps.repo.outputs.tag }} ${{ inputs.build-args }} - cache-from: | - type=gha,scope=${{ inputs.module-name }} - type=registry,ref=${{ steps.repo.outputs.image }}:buildcache - cache-to: | - type=gha,scope=${{ inputs.module-name }},mode=max - type=registry,ref=${{ steps.repo.outputs.image }}:buildcache,mode=max + cache-from: type=registry,ref=${{ steps.repo.outputs.image }}:buildcache + cache-to: type=registry,ref=${{ steps.repo.outputs.image }}:buildcache,mode=max