name: Deploy Latest Containers
on:
  push:
    branches:
      - master

jobs:
  deploy-containers:
    name: Deploy Containers
    runs-on: ubuntu-latest
    strategy:
      matrix:
        image:
          - php-apache
          - nginx
          - fpm
          - fpm-dev
          - admin
          - migrate-database
          - update-frontend
          - consume-messages
          - mysql
          - mysql-demo
          - elasticsearch
    steps:
    - name: Set up Docker Buildx
      uses: docker/setup-buildx-action@v1
    - name: Login to DockerHub
      uses: docker/login-action@v1
      with:
        username: zorgbort
        password: ${{ secrets.ZORGBORT_DOCKER_TOKEN }}
    - name: ${{ matrix.image }} to Docker Registry
      uses: docker/build-push-action@v2
      with:
        tags: |
            ilios/${{ matrix.image }}:latest
        build-args: ILIOS_VERSION=dev
        target: ${{ matrix.image }}
        platforms: linux/amd64,linux/arm64
        push: true
name: Deploy Latest Containers
on:
  push:
    branches:
      - master

jobs:
  deploy--multi-platform-containers:
    name: Deploy Containers
    runs-on: ubuntu-latest
    strategy:
      matrix:
        image:
          - php-apache
          - nginx
          - fpm
          - fpm-dev
          - admin
          - migrate-database
          - update-frontend
          - consume-messages
          - elasticsearch
    steps:
    - name: Set up Docker Buildx
      uses: docker/setup-buildx-action@v1
    - name: Login to DockerHub
      uses: docker/login-action@v1
      with:
        username: zorgbort
        password: ${{ secrets.ZORGBORT_DOCKER_TOKEN }}
    - name: Multi Platform ${{ matrix.image }} to Docker Registry
      uses: docker/build-push-action@v2
      with:
        tags: |
            ilios/${{ matrix.image }}:latest
        build-args: ILIOS_VERSION=dev
        target: ${{ matrix.image }}
        platforms: linux/amd64,linux/arm64
        push: true
  deploy-single-platform-containers:
    name: Deploy Containers
    runs-on: ubuntu-latest
    strategy:
      matrix:
        image:
          - mysql
          - mysql-demo
    steps:
    - name: Set up Docker Buildx
      uses: docker/setup-buildx-action@v1
    - name: Login to DockerHub
      uses: docker/login-action@v1
      with:
        username: zorgbort
        password: ${{ secrets.ZORGBORT_DOCKER_TOKEN }}
    - name: ${{ matrix.image }} to Docker Registry
      uses: docker/build-push-action@v2
      with:
        tags: |
            ilios/${{ matrix.image }}:latest
        build-args: ILIOS_VERSION=dev
        target: ${{ matrix.image }}
        push: true
Split mysql containers off for single platform build
Split mysql containers off for single platform build

The official mysql image doens't have an arm64 build for us to draft off
of so we'll have to skip multi-platform building for our images which
extend it.
