name: Build Docker
on:
  push:
    branches:
      - dev

jobs:
  build:
    name: Docker
    runs-on: ubuntu-latest
    steps:
    - uses: actions/checkout@v1

    - name: Login to docker hub
      uses: actions-hub/docker/login@master
      env:
        DOCKER_USERNAME: ${{ secrets.DOCKER_HUB_USERNAME }}
        DOCKER_PASSWORD: ${{ secrets.DOCKER_HUB_PASSWORD }}

    - name: Build :latest
      run: docker build -t sspaneluim/panel .

    - name: Push to docker hub :latest
      uses: actions-hub/docker@master
      with:
        args: push sspaneluim/panel:latest
