Files
godot-builder-image/build-windows.sh
Olof Pettersson 7e6471fcc0
Some checks failed
Publish Builder Images / build-base (push) Successful in 31s
Publish Builder Images / build-windows (push) Has been cancelled
Move llvm download to host machine
2025-12-02 11:16:16 +01:00

44 lines
1.5 KiB
Bash

#!/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"