mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-01-20 15:19:07 +01:00
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:
4
.github/actions/configure-docker/action.yml
vendored
4
.github/actions/configure-docker/action.yml
vendored
@@ -48,8 +48,8 @@ runs:
|
|||||||
# Always optimistically --cache‑from in case a cache blob exists
|
# Always optimistically --cache‑from in case a cache blob exists
|
||||||
args=(--cache-from "type=gha${url_args:+,${url_args}},scope=${CONTAINER_NAME}")
|
args=(--cache-from "type=gha${url_args:+,${url_args}},scope=${CONTAINER_NAME}")
|
||||||
|
|
||||||
# If this is a push to the default branch, also add --cache‑to to save the cache
|
# Only add --cache-to when using the Cirrus cache provider and pushing to the default branch.
|
||||||
if [[ ${{ github.event_name }} == "push" && ${{ github.ref_name }} == ${{ github.event.repository.default_branch }} ]]; then
|
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}")
|
args+=(--cache-to "type=gha${url_args:+,${url_args}},mode=max,ignore-error=true,scope=${CONTAINER_NAME}")
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user