name: Build docker image

on: [push, pull_request]

jobs:
  ubuntu:
    runs-on: ubuntu-latest
    steps:
    - name: Checkout master branch
      uses: actions/checkout@v2
    - name: Build Docker image
      env:
        DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }}
        DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }}
        OPENGROK_REPO_SLUG: ${{ github.repository }}
        OPENGROK_PULL_REQUEST: ${{ github.head_ref }}
        OPENGROK_REF: ${{ github.ref }}
      run: ./dev/docker.sh
