name: Build Docker images (test, no publish)

on:
  workflow_dispatch:

permissions:
  contents: read

jobs:
  build:
    name: Build ${{ matrix.file }} (${{ matrix.platform }})
    runs-on: ubuntu-latest
    strategy:
      fail-fast: false
      matrix:
        file: [Dockerfile.minimal, Dockerfile.busybox, Dockerfile.full]
        platform: [linux/amd64, linux/arm64]
    steps:
      - name: Checkout
        uses: actions/checkout@v7

      - name: Set up QEMU
        uses: docker/setup-qemu-action@v4

      - name: Set up Docker Buildx
        uses: docker/setup-buildx-action@v4

      - name: Build image
        uses: docker/build-push-action@v7
        with:
          context: .
          file: ${{ matrix.file }}
          platforms: ${{ matrix.platform }}
          push: false
          load: ${{ matrix.platform == 'linux/amd64' }}
