name: Build all images

on:
  push:
    branches: [ master ]
  pull_request:
    branches: [ master ]

permissions:
  contents: read  #  to fetch code (actions/checkout)

jobs:

  build:
    permissions:
      contents: read  #  to fetch code (actions/checkout)
      checks: write  #  to create a new check based on the results (shogo82148/actions-goveralls)

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

    - name: Check out code into the Go module directory
      uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1

    - name: Set up Go 1.x
      uses: actions/setup-go@4b73464bb391d4059bd26b0524d20df3927bd417 # v6.3.0
      with:
        go-version-file: go.mod
      id: go

    - name: Install CI
      run: |
        go get -v -t -d ./...

    - name: Test
      run: make build.image/multiarch
