#!/bin/sh set -e # --- Configuration --- BASE_IMAGE_NAME="godot-builder-base" WIN_IMAGE_NAME="godot-builder-windows" # We need the SAME hash logic to find the right base BASE_HASH=$(sha256sum Dockerfile.base | cut -c 1-8) BASE_TAG="$REGISTRY/$USERNAME/$BASE_IMAGE_NAME:$BASE_HASH" # For the Windows image, we still use the Git SHA (passed from workflow) # because we want a new Windows builder for every code commit. WIN_TAG="$REGISTRY/$USERNAME/$WIN_IMAGE_NAME:$TAG" echo "Logging in..." buildah login -u "$USERNAME" -p "$PASSWORD" --tls-verify=false --storage-driver=vfs "$REGISTRY" echo "---------------------------------------" echo "Preparing Base Image..." echo "---------------------------------------" # Pull the base (which build-base.sh guaranteed exists) buildah pull --tls-verify=false --storage-driver=vfs "$BASE_TAG" # Create the local alias so Dockerfile.windows finds it # This satisfies: FROM godot-fedora:custom buildah tag --storage-driver=vfs "$BASE_TAG" "godot-fedora:custom" echo "---------------------------------------" echo "Building Windows Image..." echo "---------------------------------------" buildah build \ --tls-verify=false \ --storage-driver=vfs \ --network=host \ --build-arg img_version=custom \ -f Dockerfile.windows \ -t "$WIN_TAG" \ -t "$REGISTRY/$USERNAME/$WIN_IMAGE_NAME:latest" \ . echo "Pushing Windows image..." buildah push --tls-verify=false --storage-driver=vfs "$WIN_TAG" buildah push --tls-verify=false --storage-driver=vfs "$REGISTRY/$USERNAME/$WIN_IMAGE_NAME:latest"