Files
Martin Storsjö 658144313c WIP: github: Test the Dockerfile.cross
Run this with the non-dev version of the image, which is the
previous release, so we end up fetching a new version of llvm,
instead of reusing whatever was checked out in the dev image.
2026-06-04 12:35:22 +03:00

104 lines
2.7 KiB
YAML

name: Build docker images
on:
push:
workflow_dispatch:
inputs:
ref:
description: 'Ref to extract from'
type: string
default: 'master'
login:
description: 'Log in to Docker Hub'
type: boolean
default: true
push:
description: 'Push the built images'
type: boolean
default: false
jobs:
prepare:
if: false
runs-on: ubuntu-latest
outputs:
TAG: ${{steps.get-parameters.outputs.TAG}}
steps:
- name: Download build parameters
uses: dawidd6/action-download-artifact@v19
with:
workflow: build.yml
workflow_conclusion: success
ref: ${{inputs.ref}}
event: push
name: parameters
- name: Get build parameters
id: get-parameters
run: |
cat parameters.txt >> $GITHUB_OUTPUT
cat $GITHUB_OUTPUT
docker-build-dev:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
with:
ref: ${{inputs.ref}}
- name: Log in to Docker Hub
if: false
uses: docker/login-action@v3
with:
username: ${{vars.DOCKER_USERNAME}}
password: ${{secrets.DOCKER_PASSWORD}}
- name: Build Docker images
uses: docker/build-push-action@v5
with:
context: .
push: false
file: ./Dockerfile.cross
tags: |
mstorsjo/llvm-mingw:cross
build-args: |
WITH_PYTHON=1
- name: Inspect Docker images
run: |
docker images
docker-build:
if: false
needs: [prepare]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
with:
ref: ${{inputs.ref}}
- name: Download toolchain
uses: dawidd6/action-download-artifact@v19
with:
workflow: build.yml
workflow_conclusion: success
ref: ${{inputs.ref}}
event: push
name: linux-ucrt-.*
name_is_regexp: true
path: toolchain
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Log in to Docker Hub
if: ${{inputs.login}}
uses: docker/login-action@v3
with:
username: ${{vars.DOCKER_USERNAME}}
password: ${{secrets.DOCKER_PASSWORD}}
- name: Build Docker images
uses: docker/build-push-action@v5
with:
context: .
platforms: linux/amd64,linux/arm64
push: ${{inputs.push}}
file: ./Dockerfile.toolchain
tags: |
mstorsjo/llvm-mingw:latest
mstorsjo/llvm-mingw:${{needs.prepare.outputs.TAG}}