Skip to content

Commit ba7bdfd

Browse files
committed
fix: add -cache suffix to docker cache
1 parent 22b9282 commit ba7bdfd

File tree

3 files changed

+14
-14
lines changed

3 files changed

+14
-14
lines changed

.github/workflows/az_acr_push.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -60,8 +60,8 @@ jobs:
6060
push: true
6161
file: ${{ (matrix.platform == 'arm64' && hashFiles('Dockerfile.arm64') != '') && 'Dockerfile.arm64' || 'Dockerfile' }}
6262
tags: ${{ env.AZURE_CONTAINER_REGISTRY }}/${{ github.event.repository.name }}:${{ matrix.platform }}-${{ steps.branch_name.outputs.GH_REF_NAME }}
63-
cache-from: type=registry,ref=${{ env.AZURE_CONTAINER_REGISTRY }}/${{ github.event.repository.name }}:${{ matrix.platform }}-${{ steps.branch_name.outputs.GH_REF_NAME }}
64-
cache-to: type=registry,ref=${{ env.AZURE_CONTAINER_REGISTRY }}/${{ github.event.repository.name }}:${{ matrix.platform }}-${{ steps.branch_name.outputs.GH_REF_NAME }},mode=max,image-manifest=true
63+
cache-from: type=registry,ref=${{ env.AZURE_CONTAINER_REGISTRY }}/${{ github.event.repository.name }}:${{ matrix.platform }}-${{ steps.branch_name.outputs.GH_REF_NAME }}-cache
64+
cache-to: type=registry,ref=${{ env.AZURE_CONTAINER_REGISTRY }}/${{ github.event.repository.name }}:${{ matrix.platform }}-${{ steps.branch_name.outputs.GH_REF_NAME }}-cache,mode=max,image-manifest=true
6565
platforms: linux/${{ matrix.platform }}
6666
build-args: |
6767
platform=linux/${{ matrix.platform }}
@@ -74,8 +74,8 @@ jobs:
7474
push: true
7575
file: 'gpu.Dockerfile'
7676
tags: ${{ env.AZURE_CONTAINER_REGISTRY }}/${{ github.event.repository.name }}:${{ matrix.platform }}-gpu
77-
cache-from: type=registry,ref=${{ env.AZURE_CONTAINER_REGISTRY }}/${{ github.event.repository.name }}:${{ matrix.platform }}-gpu
78-
cache-to: type=registry,ref=${{ env.AZURE_CONTAINER_REGISTRY }}/${{ github.event.repository.name }}:${{ matrix.platform }}-gpu,mode=max,image-manifest=true
77+
cache-from: type=registry,ref=${{ env.AZURE_CONTAINER_REGISTRY }}/${{ github.event.repository.name }}:${{ matrix.platform }}-gpu-cache
78+
cache-to: type=registry,ref=${{ env.AZURE_CONTAINER_REGISTRY }}/${{ github.event.repository.name }}:${{ matrix.platform }}-gpu-cache,mode=max,image-manifest=true
7979
platforms: linux/${{ matrix.platform }}
8080
build-args: |
8181
platform=linux/${{ matrix.platform }}

.github/workflows/az_acr_release.yml

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -52,8 +52,8 @@ jobs:
5252
if: ${{ github.event_name != 'release' }}
5353
uses: docker/build-push-action@v5
5454
with:
55-
cache-from: type=registry,ref=${{ env.AZURE_CONTAINER_REGISTRY }}/${{ github.event.repository.name }}:amd64
56-
cache-to: type=registry,ref=${{ env.AZURE_CONTAINER_REGISTRY }}/${{ github.event.repository.name }}:amd64,mode=max,image-manifest=true
55+
cache-from: type=registry,ref=${{ env.AZURE_CONTAINER_REGISTRY }}/${{ github.event.repository.name }}:amd64-cache
56+
cache-to: type=registry,ref=${{ env.AZURE_CONTAINER_REGISTRY }}/${{ github.event.repository.name }}:amd64-cache,mode=max,image-manifest=true
5757
platforms: linux/amd64
5858
file: ${{ env.DOCKERFILE }}
5959
tags: ${{ env.AZURE_CONTAINER_REGISTRY }}/${{ github.event.repository.name }}:amd64
@@ -66,8 +66,8 @@ jobs:
6666
if: ${{ github.event_name != 'release' }}
6767
uses: docker/build-push-action@v5
6868
with:
69-
cache-from: type=registry,ref=${{ env.AZURE_CONTAINER_REGISTRY }}/${{ github.event.repository.name }}:arm64
70-
cache-to: type=registry,ref=${{ env.AZURE_CONTAINER_REGISTRY }}/${{ github.event.repository.name }}:arm64,mode=max,image-manifest=true
69+
cache-from: type=registry,ref=${{ env.AZURE_CONTAINER_REGISTRY }}/${{ github.event.repository.name }}:arm64-cache
70+
cache-to: type=registry,ref=${{ env.AZURE_CONTAINER_REGISTRY }}/${{ github.event.repository.name }}:arm64-cache,mode=max,image-manifest=true
7171
platforms: linux/arm64
7272
file: ${{ env.DOCKERFILE }}
7373
tags: ${{ env.AZURE_CONTAINER_REGISTRY }}/${{ github.event.repository.name }}:arm64
@@ -79,8 +79,8 @@ jobs:
7979
- name: Build & Push ${{ github.event.repository.name }}:${{ env.IMAGE_TAG }}
8080
uses: docker/build-push-action@v5
8181
with:
82-
cache-from: type=registry,ref=${{ env.AZURE_CONTAINER_REGISTRY }}/${{ github.event.repository.name }}:latest
83-
cache-to: type=registry,ref=${{ env.AZURE_CONTAINER_REGISTRY }}/${{ github.event.repository.name }}:latest,mode=max,image-manifest=true
82+
cache-from: type=registry,ref=${{ env.AZURE_CONTAINER_REGISTRY }}/${{ github.event.repository.name }}:latest-cache
83+
cache-to: type=registry,ref=${{ env.AZURE_CONTAINER_REGISTRY }}/${{ github.event.repository.name }}:latest-cache,mode=max,image-manifest=true
8484
platforms: linux/amd64
8585
file: ${{ env.DOCKERFILE }}
8686
tags: ${{ env.AZURE_CONTAINER_REGISTRY }}/${{ github.event.repository.name }}:${{ env.IMAGE_TAG }}
@@ -92,8 +92,8 @@ jobs:
9292
- name: Build & Push ${{ github.event.repository.name }}:latest
9393
uses: docker/build-push-action@v5
9494
with:
95-
cache-from: type=registry,ref=${{ env.AZURE_CONTAINER_REGISTRY }}/${{ github.event.repository.name }}:latest
96-
cache-to: type=registry,ref=${{ env.AZURE_CONTAINER_REGISTRY }}/${{ github.event.repository.name }}:latest,mode=max,image-manifest=true
95+
cache-from: type=registry,ref=${{ env.AZURE_CONTAINER_REGISTRY }}/${{ github.event.repository.name }}:latest-cache
96+
cache-to: type=registry,ref=${{ env.AZURE_CONTAINER_REGISTRY }}/${{ github.event.repository.name }}:latest-cache,mode=max,image-manifest=true
9797
platforms: linux/amd64
9898
file: ${{ env.DOCKERFILE }}
9999
tags: ${{ env.AZURE_CONTAINER_REGISTRY }}/${{ github.event.repository.name }}:latest

.github/workflows/az_acr_test.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,8 +41,8 @@ jobs:
4141
- name: Build & Push ${{ github.event.repository.name }}:test-${{ steps.branch_name.outputs.GH_REF_NAME }}
4242
uses: docker/build-push-action@v5
4343
with:
44-
cache-from: type=registry,ref=${{ env.AZURE_CONTAINER_REGISTRY }}/${{ github.event.repository.name }}:test-${{ steps.branch_name.outputs.GH_REF_NAME }}
45-
cache-to: type=registry,ref=${{ env.AZURE_CONTAINER_REGISTRY }}/${{ github.event.repository.name }}:test-${{ steps.branch_name.outputs.GH_REF_NAME }},mode=max,image-manifest=true
44+
cache-from: type=registry,ref=${{ env.AZURE_CONTAINER_REGISTRY }}/${{ github.event.repository.name }}:test-${{ steps.branch_name.outputs.GH_REF_NAME }}-cache
45+
cache-to: type=registry,ref=${{ env.AZURE_CONTAINER_REGISTRY }}/${{ github.event.repository.name }}:test-${{ steps.branch_name.outputs.GH_REF_NAME }}-cache,mode=max,image-manifest=true
4646
file: 'dev.Dockerfile'
4747
tags: ${{ env.AZURE_CONTAINER_REGISTRY }}/${{ github.event.repository.name }}:test-${{ steps.branch_name.outputs.GH_REF_NAME }}
4848
push: true

0 commit comments

Comments
 (0)