name: 'CI'

on:
  push:
    tags: ['*']
    branches: ['*']
  pull_request:
    branches: ['*']
  workflow_dispatch:

jobs:

  build:
    name: 'Build ${{ matrix.arch }} image'
    runs-on: 'ubuntu-latest'
    strategy:
      matrix:
        arch: ['amd64', 'arm64v8']
    steps:
      - name: 'Checkout project'
        uses: 'actions/checkout@v3'
      - name: 'Build image'
        run: |
          make binfmt-register
          make IMAGE_BUILD_OPTS="--pull" "build-${{ matrix.arch }}-image"
