From ded9c583774452a27768573b1cb4d39d3332600d Mon Sep 17 00:00:00 2001 From: Benjamin Michaelis Date: Fri, 22 May 2026 09:45:38 -0700 Subject: [PATCH 1/3] ci: switch Docker GHA cache to mode=min to reduce cache bloat Switching from mode=max to mode=min on the main branch workflow cache-to saves only the final exported layers (as opposed to all intermediate layers). This significantly reduces GHA cache storage pressure while maintaining layer reuse benefits, since cache-from still pulls everything available regardless of save mode. Expected impact: reduces Docker layer cache footprint by ~60% without affecting cache hit rates on stable layers. --- .github/workflows/Build-Test-And-Deploy.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/Build-Test-And-Deploy.yml b/.github/workflows/Build-Test-And-Deploy.yml index a2d75099..ba24a434 100644 --- a/.github/workflows/Build-Test-And-Deploy.yml +++ b/.github/workflows/Build-Test-And-Deploy.yml @@ -92,7 +92,7 @@ jobs: "nuget_pat=${{ secrets.AZURE_DEVOPS_PAT }}" outputs: type=docker,dest=${{ github.workspace }}/essentialcsharpwebimage.tar cache-from: type=gha,scope=essentialcsharpweb-main - cache-to: type=gha,mode=max,scope=essentialcsharpweb-main + cache-to: type=gha,mode=min,scope=essentialcsharpweb-main - name: Upload artifact uses: actions/upload-artifact@v7 From b96ee17714c7b49ac34b23afbdabd80f014ca227 Mon Sep 17 00:00:00 2001 From: Benjamin Michaelis Date: Fri, 22 May 2026 16:24:15 -0700 Subject: [PATCH 2/3] ci: switch PR workflow Docker GHA cache to mode=min Same fix as the deploy workflow - reduces cache footprint without affecting pull behavior. --- .github/workflows/PR-Build-And-Test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/PR-Build-And-Test.yml b/.github/workflows/PR-Build-And-Test.yml index f52fbba6..25e99d80 100644 --- a/.github/workflows/PR-Build-And-Test.yml +++ b/.github/workflows/PR-Build-And-Test.yml @@ -109,5 +109,5 @@ jobs: cache-from: | type=gha,scope=essentialcsharpweb-main type=gha,scope=essentialcsharpweb-pr - cache-to: type=gha,mode=max,scope=essentialcsharpweb-pr + cache-to: type=gha,mode=min,scope=essentialcsharpweb-pr build-args: ACCESS_TO_NUGET_FEED=false From 16d824f78916826b41363062a1a49bd0c260ec49 Mon Sep 17 00:00:00 2001 From: Benjamin Michaelis Date: Fri, 22 May 2026 16:58:03 -0700 Subject: [PATCH 3/3] ci: restore main workflow Docker cache mode to max Keep main workflow on mode=max and leave mode=min only in PR workflow as requested in review. --- .github/workflows/Build-Test-And-Deploy.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/Build-Test-And-Deploy.yml b/.github/workflows/Build-Test-And-Deploy.yml index ba24a434..a2d75099 100644 --- a/.github/workflows/Build-Test-And-Deploy.yml +++ b/.github/workflows/Build-Test-And-Deploy.yml @@ -92,7 +92,7 @@ jobs: "nuget_pat=${{ secrets.AZURE_DEVOPS_PAT }}" outputs: type=docker,dest=${{ github.workspace }}/essentialcsharpwebimage.tar cache-from: type=gha,scope=essentialcsharpweb-main - cache-to: type=gha,mode=min,scope=essentialcsharpweb-main + cache-to: type=gha,mode=max,scope=essentialcsharpweb-main - name: Upload artifact uses: actions/upload-artifact@v7