fix(ci): use preloaded cache on restricted runners
Runner Canary / runner-canary (push) Successful in 1s
Runner Canary / runner-canary (push) Successful in 1s
This commit is contained in:
@@ -61,8 +61,10 @@ jobs:
|
|||||||
set -eu
|
set -eu
|
||||||
registry="$(printf '%s' '${{ inputs.image_name }}' | cut -d/ -f1)"
|
registry="$(printf '%s' '${{ inputs.image_name }}' | cut -d/ -f1)"
|
||||||
printf '%s' "$REGISTRY_PASSWORD" | docker login "$registry" -u "$REGISTRY_USERNAME" --password-stdin
|
printf '%s' "$REGISTRY_PASSWORD" | docker login "$registry" -u "$REGISTRY_USERNAME" --password-stdin
|
||||||
if [ -n "${{ inputs.cache_image }}" ]; then
|
if [ -n "${{ inputs.cache_image }}" ] && ! docker image inspect "${{ inputs.cache_image }}" >/dev/null 2>&1; then
|
||||||
docker pull "${{ inputs.cache_image }}"
|
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
|
fi
|
||||||
- name: Build immutable candidate image
|
- name: Build immutable candidate image
|
||||||
run: |
|
run: |
|
||||||
|
|||||||
Reference in New Issue
Block a user