65 lines
1.8 KiB
YAML
65 lines
1.8 KiB
YAML
name: Publish Builder Images
|
|
on:
|
|
push:
|
|
paths:
|
|
- 'Dockerfile.*'
|
|
- '*.sh'
|
|
|
|
jobs:
|
|
# JOB 1: Handles the Fedora Base
|
|
build-base:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v3
|
|
|
|
- name: Make scripts executable
|
|
run: chmod +x *.sh
|
|
|
|
- name: Build/Cache Base
|
|
uses: docker://quay.io/buildah/stable
|
|
env:
|
|
USERNAME: ${{ gitea.repository_owner }}
|
|
PASSWORD: ${{ secrets.USER_PACKAGE_PASSWORD }}
|
|
REGISTRY: gitea.212.63.210.91.nip.io
|
|
with:
|
|
entrypoint: /bin/sh
|
|
args: ./build-base.sh
|
|
|
|
# JOB 2: Handles the Windows Builder
|
|
# Only runs if Base succeeds.
|
|
build-windows:
|
|
needs: build-base
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v3
|
|
|
|
- name: Make scripts executable
|
|
run: chmod +x *.sh
|
|
|
|
# --- NEW STEP: Download on Host ---
|
|
- name: Pre-download LLVM Toolchain
|
|
run: |
|
|
# Variable MUST match what is in build-windows.sh
|
|
LLVM_VER="20250528"
|
|
TARBALL="llvm-mingw-${LLVM_VER}-ucrt-ubuntu-22.04-x86_64.tar.xz"
|
|
URL="https://github.com/mstorsjo/llvm-mingw/releases/download/${LLVM_VER}/${TARBALL}"
|
|
|
|
echo "Downloading $TARBALL on runner host..."
|
|
wget "$URL"
|
|
|
|
echo "Verifying file size..."
|
|
ls -lh "$TARBALL"
|
|
|
|
- name: Build Windows Target
|
|
uses: docker://quay.io/buildah/stable
|
|
env:
|
|
USERNAME: ${{ gitea.repository_owner }}
|
|
PASSWORD: ${{ secrets.USER_PACKAGE_PASSWORD }}
|
|
REGISTRY: gitea.212.63.210.91.nip.io
|
|
# We pass the Git SHA here for the final image tag
|
|
TAG: ${{ gitea.sha }}
|
|
with:
|
|
entrypoint: /bin/sh
|
|
args: ./build-windows.sh |