From 4426668518a6a72c1662c48f2209da9dea0b10ad Mon Sep 17 00:00:00 2001 From: ahmzaa Date: Sat, 25 Jul 2026 02:21:38 +0100 Subject: [PATCH] Use registry build cache instead of gha cache The GitHub-hosted 'gha' cache backend is unreachable from the self-hosted Gitea runner (dial tcp 172.18.0.2:44181 i/o timeout), which failed the build step even though the image pushed successfully. Switch cache-from/cache-to to a registry-backed cache stored as a :buildcache tag in the same Gitea registry, which works on self-hosted runners. --- .github/workflows/build-docker-images.yml | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build-docker-images.yml b/.github/workflows/build-docker-images.yml index 4c1c09f..2953f22 100644 --- a/.github/workflows/build-docker-images.yml +++ b/.github/workflows/build-docker-images.yml @@ -46,8 +46,11 @@ jobs: tags: | ${{ env.REGISTRY }}/${{ gitea.repository_owner }}/blog-ahmza-com:latest ${{ env.REGISTRY }}/${{ gitea.repository_owner }}/blog-ahmza-com:${{ gitea.event.head_commit.id }} - cache-from: type=gha - cache-to: type=gha,mode=max + # Registry-backed build cache. The GitHub-hosted 'gha' cache is not + # reachable from self-hosted Gitea runners, so store the cache as a + # dedicated tag in the same registry instead. + cache-from: type=registry,ref=${{ env.REGISTRY }}/${{ gitea.repository_owner }}/blog-ahmza-com:buildcache + cache-to: type=registry,ref=${{ env.REGISTRY }}/${{ gitea.repository_owner }}/blog-ahmza-com:buildcache,mode=max deploy: runs-on: ubuntu-latest needs: build