name: Docker Image CI

on:
  push:
    branches:
      - master

jobs:
  build:
    if: github.repository == 'ScilifelabDataCentre/lunch-menu'
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v2
      - name: Publish backend to Docker Hub
        uses: elgohr/Publish-Docker-Github-Action@master
        with:
          name: scilifelabdatacentre/menu-backend
          username: ${{ secrets.DOCKERHUB_USERNAME }}
          password: ${{ secrets.DOCKERHUB_TOKEN }}
          dockerfile: k8s/Dockerfile-backend
          tags: "latest"
      - name: Publish frontend to Docker Hub
        uses: elgohr/Publish-Docker-Github-Action@master
        with:
          name: scilifelabdatacentre/menu-frontend
          username: ${{ secrets.DOCKERHUB_USERNAME }}
          password: ${{ secrets.DOCKERHUB_TOKEN }}
          dockerfile: k8s/Dockerfile-frontend
          tags: "latest"

Build images for Dockerhub in Github
Build images for Dockerhub in Github
