fix(ci): use preloaded cache on restricted runners
Runner Canary / runner-canary (push) Successful in 1s

This commit is contained in:
TJWater CI
2026-08-07 17:40:29 +08:00
parent ce6caff85f
commit 805dccf3e9
+4 -2
View File
@@ -61,8 +61,10 @@ jobs:
set -eu
registry="$(printf '%s' '${{ inputs.image_name }}' | cut -d/ -f1)"
printf '%s' "$REGISTRY_PASSWORD" | docker login "$registry" -u "$REGISTRY_USERNAME" --password-stdin
if [ -n "${{ inputs.cache_image }}" ]; then
docker pull "${{ inputs.cache_image }}"
if [ -n "${{ inputs.cache_image }}" ] && ! docker image inspect "${{ inputs.cache_image }}" >/dev/null 2>&1; then
echo "Required CI cache image is not present on this Runner: ${{ inputs.cache_image }}"
echo "Import the cache image locally before starting this workflow."
exit 1
fi
- name: Build immutable candidate image
run: |