Skip to content

Commit 4f962b4

Browse files
committed
fix invalid cache image tag name
1 parent 4075ffd commit 4f962b4

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

.github/workflows/ci.yml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,8 @@ jobs:
8383
with:
8484
username: ${{ env.REGISTRY_USERNAME }}
8585
password: ${{ secrets.DOCKERHUB_TOKEN }}
86+
- id: cache_name
87+
run: echo "img=${{ env.REGISTRY_IMAGE }}:cache-$(tr '/' '-' <<< ${{ matrix.platform }})" >> "$GITHUB_OUTPUT"
8688
- name: Build and push by digest
8789
id: build
8890
uses: docker/build-push-action@v5
@@ -91,8 +93,8 @@ jobs:
9193
platforms: ${{ matrix.platform }}
9294
labels: ${{ steps.meta.outputs.labels }}
9395
outputs: type=image,name=${{ env.REGISTRY_IMAGE }},push-by-digest=true,name-canonical=true,push=true
94-
cache-from: type=registry,ref=${{ env.REGISTRY_IMAGE }}:cache-${{ matrix.platform }}
95-
cache-to: type=registry,ref=${{ env.REGISTRY_IMAGE }}:cache-${{ matrix.platform }},compression=zstd,mode=max
96+
cache-from: type=registry,ref=${{ steps.cache_name.outputs.img }}
97+
cache-to: type=registry,ref=${{ steps.cache_name.outputs.img }},compression=zstd,mode=max
9698
- name: Export digest
9799
run: |
98100
mkdir -p /tmp/digests

0 commit comments

Comments
 (0)