Skip to content

Commit 48999fc

Browse files
committed
temp commit
1 parent f9b85c3 commit 48999fc

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

.github/workflows/build-docker-image.yml

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,14 @@ jobs:
7070
username: ${{ secrets.DOCKERHUB_USER }}
7171
password: ${{ secrets.DOCKERHUB_TOKEN }}
7272

73+
- name: Set cache configuration
74+
id: cache_config
75+
run: |
76+
if [ "${{ steps.should_push.outputs.should_push }}" == "true" ]; then
77+
echo "cache_from=type=registry,ref=${FULL_TAG}-cache" >> $GITHUB_OUTPUT
78+
echo "cache_to=type=registry,ref=${FULL_TAG}-cache,mode=max" >> $GITHUB_OUTPUT
79+
fi
80+
7381
- name: Build and push Docker image for cloudstack-kubernetes-provider (multi-arch)
7482
uses: docker/build-push-action@v5
7583
with:
@@ -78,5 +86,5 @@ jobs:
7886
platforms: linux/amd64,linux/arm64
7987
push: ${{ steps.should_push.outputs.should_push == 'true' }}
8088
tags: ${{ env.FULL_TAG }}
81-
cache-from: type=registry,ref=${{ env.FULL_TAG }}-cache
82-
cache-to: type=registry,ref=${{ env.FULL_TAG }}-cache,mode=max
89+
cache-from: ${{ steps.cache_config.outputs.cache_from }}
90+
cache-to: ${{ steps.cache_config.outputs.cache_to }}

0 commit comments

Comments
 (0)