name: Check format

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

jobs:
  check-format:
    name: Check the code formatting

    runs-on: ubuntu-latest

    steps:
    - uses: actions/checkout@v2
    - name: install dependencies
      run: sudo apt-get install -y clang-format-7
    - name: autogen
      run: ./autogen.sh
    - name: configure
      run: ./configure
    - name: check format
      run: make format-sources
    - name: diff index
      run: git diff-index --exit-code HEAD -- .

Add a workflow to check the format
Add a workflow to check the format

Using clang-format
