From dd7094e5d392838d9850de66951bfd60839848be Mon Sep 17 00:00:00 2001 From: Lea Anthony Date: Tue, 6 Jan 2026 08:50:47 +1100 Subject: [PATCH] ci: add workflow to build cross-compiler Docker image --- .github/workflows/build-cross-image.yml | 69 +++++++++++++++++++++++++ 1 file changed, 69 insertions(+) create mode 100644 .github/workflows/build-cross-image.yml diff --git a/.github/workflows/build-cross-image.yml b/.github/workflows/build-cross-image.yml new file mode 100644 index 000000000..a7e5ee09a --- /dev/null +++ b/.github/workflows/build-cross-image.yml @@ -0,0 +1,69 @@ +name: Build Cross-Compiler Image + +on: + workflow_dispatch: + inputs: + sdk_version: + description: 'macOS SDK version' + required: true + default: '26.1' + zig_version: + description: 'Zig version' + required: true + default: '0.14.0' + image_version: + description: 'Image version tag' + required: true + default: '1.0.0' + +env: + REGISTRY: ghcr.io + IMAGE_NAME: wailsapp/wails-cross + +jobs: + build: + runs-on: ubuntu-latest + permissions: + contents: read + packages: write + + steps: + - name: Checkout v3-alpha + uses: actions/checkout@v4 + with: + ref: v3-alpha + + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v3 + + - name: Log in to Container Registry + uses: docker/login-action@v3 + with: + registry: ${{ env.REGISTRY }} + username: ${{ github.actor }} + password: ${{ secrets.GITHUB_TOKEN }} + + - name: Extract metadata + id: meta + uses: docker/metadata-action@v5 + with: + images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }} + tags: | + type=raw,value=latest + type=raw,value=${{ inputs.image_version }} + type=raw,value=sdk-${{ inputs.sdk_version }} + + - name: Build and push + uses: docker/build-push-action@v5 + with: + context: v3/internal/setupwizard/docker + file: v3/internal/setupwizard/docker/Dockerfile.cross + push: true + tags: ${{ steps.meta.outputs.tags }} + labels: ${{ steps.meta.outputs.labels }} + build-args: | + ZIG_VERSION=${{ inputs.zig_version }} + MACOS_SDK_VERSION=${{ inputs.sdk_version }} + IMAGE_VERSION=${{ inputs.image_version }} + cache-from: type=gha + cache-to: type=gha,mode=max