name: Protogen Validation

on:
  push:
    branches: [main]

  pull_request:
    branches: [main]

jobs:
  protogen:
    runs-on: ubuntu-latest
    steps:
    - uses: actions/checkout@v2.4.0
      with:
        submodules: true

    - uses: actions/setup-go@v2
      with:
        go-version: ^1.17

    - name: Run protogen validation
      run: make proto && git diff --name-status --exit-code
