Skip to content

Commit fabe0e0

Browse files
author
MarcoFalke
committed
ci: Only write docker build images to Cirrus cache
Other cache providers offer too little space for this to be useful.
1 parent fab64a5 commit fabe0e0

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

.github/actions/configure-docker/action.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,8 +48,8 @@ runs:
4848
# Always optimistically --cache‑from in case a cache blob exists
4949
args=(--cache-from "type=gha${url_args:+,${url_args}},scope=${CONTAINER_NAME}")
5050
51-
# If this is a push to the default branch, also add --cache‑to to save the cache
52-
if [[ ${{ github.event_name }} == "push" && ${{ github.ref_name }} == ${{ github.event.repository.default_branch }} ]]; then
51+
# Only add --cache-to when using the Cirrus cache provider and pushing to the default branch.
52+
if [[ ${{ inputs.cache-provider }} == 'cirrus' && ${{ github.event_name }} == "push" && ${{ github.ref_name }} == ${{ github.event.repository.default_branch }} ]]; then
5353
args+=(--cache-to "type=gha${url_args:+,${url_args}},mode=max,ignore-error=true,scope=${CONTAINER_NAME}")
5454
fi
5555

0 commit comments

Comments
 (0)