diff --git a/.github/workflows/auto-clang-format.yml b/.github/workflows/auto-clang-format.yml new file mode 100644 index 0000000..fb75b76 --- /dev/null +++ b/.github/workflows/auto-clang-format.yml @@ -0,0 +1,23 @@ +name: auto-clang-format +on: [pull_request] + +jobs: + build: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v3 + - uses: DoozyX/clang-format-lint-action@v0.13 + with: + source: '.' + exclude: './third_party ./external' + extensions: 'h,cpp,hpp' + clangFormatVersion: 13 + inplace: True + - uses: EndBug/add-and-commit@v4 + with: + author_name: Clang Robot + author_email: robot@example.com + message: ':art: Committing clang-format changes' + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} \ No newline at end of file