ci: Only write docker build images to Cirrus cache

Other cache providers offer too little space for this to be useful.
This commit is contained in:
MarcoFalke
2025-10-16 11:39:24 +02:00
parent fab64a5d6f
commit fabe0e07de

View File

@@ -48,8 +48,8 @@ runs:
# Always optimistically --cachefrom in case a cache blob exists
args=(--cache-from "type=gha${url_args:+,${url_args}},scope=${CONTAINER_NAME}")
# If this is a push to the default branch, also add --cacheto to save the cache
if [[ ${{ github.event_name }} == "push" && ${{ github.ref_name }} == ${{ github.event.repository.default_branch }} ]]; then
# Only add --cache-to when using the Cirrus cache provider and pushing to the default branch.
if [[ ${{ inputs.cache-provider }} == 'cirrus' && ${{ github.event_name }} == "push" && ${{ github.ref_name }} == ${{ github.event.repository.default_branch }} ]]; then
args+=(--cache-to "type=gha${url_args:+,${url_args}},mode=max,ignore-error=true,scope=${CONTAINER_NAME}")
fi