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.
This commit is contained in:
@@ -46,8 +46,11 @@ jobs:
|
|||||||
tags: |
|
tags: |
|
||||||
${{ env.REGISTRY }}/${{ gitea.repository_owner }}/blog-ahmza-com:latest
|
${{ env.REGISTRY }}/${{ gitea.repository_owner }}/blog-ahmza-com:latest
|
||||||
${{ env.REGISTRY }}/${{ gitea.repository_owner }}/blog-ahmza-com:${{ gitea.event.head_commit.id }}
|
${{ env.REGISTRY }}/${{ gitea.repository_owner }}/blog-ahmza-com:${{ gitea.event.head_commit.id }}
|
||||||
cache-from: type=gha
|
# Registry-backed build cache. The GitHub-hosted 'gha' cache is not
|
||||||
cache-to: type=gha,mode=max
|
# 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:
|
deploy:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
needs: build
|
needs: build
|
||||||
|
|||||||
Reference in New Issue
Block a user