Files
llvm-mingw/.github/workflows/docker.yml
T
Martin Storsjö 34f111adcb github: Upgrade the docker actions to the latest version
This avoids warnings about the actions targeting Node 20.

There is no easily available documentation about whether there are
any other API changes in the newer versions of these actions - in
particular the bump of build-push-action which advances by two
versions.
2026-08-03 10:05:30 +03:00

101 lines
2.7 KiB
YAML

name: Build docker images
on:
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:
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:
needs: [prepare]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
with:
ref: ${{inputs.ref}}
- name: Log in to Docker Hub
if: ${{inputs.login}}
uses: docker/login-action@v4
with:
username: ${{vars.DOCKER_USERNAME}}
password: ${{secrets.DOCKER_PASSWORD}}
- name: Build Docker images
uses: docker/build-push-action@v7
with:
context: .
push: ${{inputs.push}}
file: ./Dockerfile.dev
tags: |
mstorsjo/llvm-mingw:dev
mstorsjo/llvm-mingw:dev-${{needs.prepare.outputs.TAG}}
- name: Inspect Docker images
run: |
docker images
docker-build:
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@v4
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v4
- name: Log in to Docker Hub
if: ${{inputs.login}}
uses: docker/login-action@v4
with:
username: ${{vars.DOCKER_USERNAME}}
password: ${{secrets.DOCKER_PASSWORD}}
- name: Build Docker images
uses: docker/build-push-action@v7
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}}