name: ovn-docker-images

on:
  push:
  pull_request:
    branches: [ master ]
    paths: [ "dist/images/Dockerfile*"]

env:
  GO_VERSION: 1.13.4

jobs:
  build:
    name: Build Images
    runs-on: ubuntu-latest
    steps:
    - name: Set up Go
      uses: actions/setup-go@v1
      with:
        go-version: ${{ env.GO_VERSION }}
      id: go

    - name: Check out code into the Go module directory
      uses: actions/checkout@v2

    - name: Set up environment
      run: |
        export GOPATH=$(go env GOPATH)
        echo "::set-env name=GOPATH::$GOPATH"
        export PATH=$GOPATH/bin:$PATH
        echo "::add-path::$GOPATH/bin"

    - name: Build images
      run: |
        make -C dist/images all
