fix(ci): Improve runtime-base image reference handling in build job

- Better handling of optional runtime-base outputs
- Added null check for runtime-base image_ref
- Improved logging when using freshly built runtime image
This commit is contained in:
2025-11-01 21:22:26 +01:00
parent 0c7b96e887
commit e17469084d

View File

@@ -648,9 +648,11 @@ jobs:
DEFAULT_IMAGE="${{ env.REGISTRY }}/${{ env.RUNTIME_IMAGE_NAME }}:latest" DEFAULT_IMAGE="${{ env.REGISTRY }}/${{ env.RUNTIME_IMAGE_NAME }}:latest"
SELECTED_IMAGE="$DEFAULT_IMAGE" SELECTED_IMAGE="$DEFAULT_IMAGE"
RUNTIME_BASE_REF="${{ needs.runtime-base.outputs.image_ref || '' }}" # Try to get runtime-base image_ref (may not be available if runtime-base was skipped)
if [ -n "$RUNTIME_BASE_REF" ] && [ "$RUNTIME_BASE_REF" != "" ]; then RUNTIME_BASE_REF="${{ needs.runtime-base.outputs.image_ref }}"
if [ -n "$RUNTIME_BASE_REF" ] && [ "$RUNTIME_BASE_REF" != "" ] && [ "$RUNTIME_BASE_REF" != "null" ]; then
SELECTED_IMAGE="$RUNTIME_BASE_REF" SELECTED_IMAGE="$RUNTIME_BASE_REF"
echo " Verwende frisch gebautes Runtime-Image: $SELECTED_IMAGE"
else else
if ! docker pull "$DEFAULT_IMAGE" >/dev/null 2>&1; then if ! docker pull "$DEFAULT_IMAGE" >/dev/null 2>&1; then
ALT_REGISTRY="${{ env.REGISTRY_URL }}" ALT_REGISTRY="${{ env.REGISTRY_URL }}"