name: build-image

on:
  push:
    branches: [ main ]
    paths:
    - 'hack/build-image/Dockerfile'

jobs:
  build:
    name: Build
    runs-on: ubuntu-latest
    steps:

    - uses: actions/checkout@master

    - name: Build
      run: make build-image

    - name: Publish container image
      run: |
        docker login -u ${{ secrets.DOCKER_USER }} -p ${{ secrets.DOCKER_PASSWORD }}
       
        make push-build-image
