ci: reuse image layers via registry build cache
CI / Code Health (pull_request) Successful in 16s
CI / Lint & Build (pull_request) Successful in 32s

The docker driver cannot export cache, so add setup-buildx (docker-container driver) and push/pull the build cache from <image>:buildcache.
This commit is contained in:
fristy committed 2026-10-30 20:24:24 +03:00
1 parent 24287e69db
commit 84df7a58d9
1 file changed
+4
+4
View File
@@ -29,6 +29,8 @@ jobs:
registry: ${{ env.REGISTRY }} registry: ${{ env.REGISTRY }}
username: ${{ github.actor }} username: ${{ github.actor }}
password: ${{ secrets.REGISTRY_TOKEN }} password: ${{ secrets.REGISTRY_TOKEN }}
- name: Set up Buildx
uses: docker/setup-buildx-action@v3
- name: Resolve tags - name: Resolve tags
id: meta id: meta
uses: docker/metadata-action@v5 uses: docker/metadata-action@v5
@@ -43,6 +45,8 @@ jobs:
with: with:
context: . context: .
push: true push: true
cache-from: type=registry,ref=${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:buildcache
cache-to: type=registry,ref=${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:buildcache,mode=max
tags: ${{ steps.meta.outputs.tags }} tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }} labels: ${{ steps.meta.outputs.labels }}