From bbceac6cb0e322f73a3ce323abbd9d307b59a3d1 Mon Sep 17 00:00:00 2001 From: Luca <102960244+Luca-Timo@users.noreply.github.com> Date: Fri, 12 Jun 2026 17:56:06 +0200 Subject: [PATCH] ci: make GHA cache export non-fatal (ignore-error=true) The frontend/backend image builds + pushes succeed, then the final 'exporting to GitHub Actions Cache' step intermittently fails with 'error writing layer blob: not_found' (a known flaky type=gha cache backend issue), failing the whole job. Add ignore-error=true to every cache-to so a cache-write hiccup can't break an otherwise-successful, already-pushed build. --- .github/workflows/docker-build.yml | 10 ++++++++-- .github/workflows/install-smoke.yml | 3 ++- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/.github/workflows/docker-build.yml b/.github/workflows/docker-build.yml index bf98c108..6aa4d1d5 100644 --- a/.github/workflows/docker-build.yml +++ b/.github/workflows/docker-build.yml @@ -134,7 +134,10 @@ jobs: platforms: ${{ matrix.platform }} labels: ${{ steps.meta-backend.outputs.labels }} cache-from: type=gha,scope=backend-${{ env.PLATFORM_PAIR }} - cache-to: type=gha,mode=max,scope=backend-${{ env.PLATFORM_PAIR }} + # ignore-error: a flaky GitHub Actions cache write ("error writing + # layer blob: not_found") must not fail an otherwise-successful build + # that already pushed the image. + cache-to: type=gha,mode=max,scope=backend-${{ env.PLATFORM_PAIR }},ignore-error=true outputs: ${{ steps.push-decision.outputs.push == 'true' && format('type=image,name={0}/{1},push-by-digest=true,name-canonical=true,push=true', env.REGISTRY, env.BACKEND_IMAGE_NAME) || 'type=cacheonly' }} build-args: | CACHEBUST=${{ github.run_number }} @@ -360,7 +363,10 @@ jobs: platforms: ${{ matrix.platform }} labels: ${{ steps.meta-frontend.outputs.labels }} cache-from: type=gha,scope=frontend-${{ env.PLATFORM_PAIR }} - cache-to: type=gha,mode=max,scope=frontend-${{ env.PLATFORM_PAIR }} + # ignore-error: a flaky GitHub Actions cache write ("error writing + # layer blob: not_found") must not fail an otherwise-successful build + # that already pushed the image. + cache-to: type=gha,mode=max,scope=frontend-${{ env.PLATFORM_PAIR }},ignore-error=true outputs: ${{ steps.push-decision.outputs.push == 'true' && format('type=image,name={0}/{1},push-by-digest=true,name-canonical=true,push=true', env.REGISTRY, env.FRONTEND_IMAGE_NAME) || 'type=cacheonly' }} build-args: | CACHEBUST=${{ github.run_number }} diff --git a/.github/workflows/install-smoke.yml b/.github/workflows/install-smoke.yml index f93ef6bf..b1c655e3 100644 --- a/.github/workflows/install-smoke.yml +++ b/.github/workflows/install-smoke.yml @@ -61,7 +61,8 @@ jobs: load: true tags: picpeak-backend:smoke cache-from: type=gha,scope=install-smoke - cache-to: type=gha,mode=max,scope=install-smoke + # ignore-error: a flaky GHA cache write must not fail the build. + cache-to: type=gha,mode=max,scope=install-smoke,ignore-error=true - name: Create Docker network run: docker network create picpeak-smoke