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

jobs:
  deploy-latest-containers:
    name: Github Registry as latest
    runs-on: ubuntu-latest
    strategy:
      matrix:
        image:
          - php-apache
          - nginx
          - fpm
          - fpm-dev
          - admin
          - migrate-database
          - update-frontend
          - consume-messages
          - ilios-mysql
          - ilios-mysql-demo
    steps:
    - uses: actions/checkout@v2
    - name: ${{ matrix.image }} to Github Registry
      uses: elgohr/Publish-Docker-Github-Action@2.17
      with:
        name: ilios/ilios/${{ matrix.image }}
        username: ${{ github.actor }}
        password: ${{ secrets.GITHUB_TOKEN }}
        registry: docker.pkg.github.com
        buildoptions: "--target ${{ matrix.image }}"

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

jobs:
  deploy-latest-containers:
    name: Github Registry as latest
    runs-on: ubuntu-latest
    strategy:
      matrix:
        image:
          - php-apache
          - nginx
          - fpm
          - fpm-dev
          - admin
          - migrate-database
          - update-frontend
          - consume-messages
          - ilios-mysql
          - ilios-mysql-demo
    steps:
    - uses: actions/checkout@v2
    - name: ${{ matrix.image }} to Github Registry
      uses: docker/build-push-action@v1
      with:
        username: ${{ github.actor }}
        password: ${{ secrets.GITHUB_TOKEN }}
        registry: docker.pkg.github.com
        repository: ${{github.repository}}/${{ matrix.image }}
        tags: latest
        target: ${{ matrix.image }}

Use the verified action to deploy
Use the verified action to deploy

I'm more comfortable with the security implications of doing this deploy
using a verified action from docker.
