From 00880628fdcb70522adb37106a45b020d4234924 Mon Sep 17 00:00:00 2001 From: Joseph Henry Date: Sun, 18 Apr 2021 00:04:33 -0700 Subject: [PATCH] Add code style enforcement to github workflow --- .github/workflows/auto-format.yml | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 .github/workflows/auto-format.yml diff --git a/.github/workflows/auto-format.yml b/.github/workflows/auto-format.yml new file mode 100644 index 0000000..772413a --- /dev/null +++ b/.github/workflows/auto-format.yml @@ -0,0 +1,24 @@ +name: Code style compliance check +on: push + +jobs: + run: + name: Format + runs-on: ubuntu-latest + steps: + - name: Checkout repo + uses: actions/checkout@v2 + + - name: Install clang-format + run: sudo apt-get install clang-format + + - name: Format code + run: ./build.sh format-code + + - name: Commit changes + uses: joseph-henry/add-and-commit@v7 + with: + author_name: github-actions + author_email: 41898282+github-actions[bot]@users.noreply.github.com + message: 'Force code style compliance' + add: '.'