diff --git a/.github/workflows/clang-format.yml b/.github/workflows/clang-format.yml index 5719152cfc..cd088c5a28 100644 --- a/.github/workflows/clang-format.yml +++ b/.github/workflows/clang-format.yml @@ -3,7 +3,7 @@ on: [push] jobs: formatting-check: name: Formatting Check - runs-on: ubuntu-latest + runs-on: ubuntu-24.04 strategy: matrix: path: diff --git a/.github/workflows/clang-pr.yml b/.github/workflows/clang-pr.yml new file mode 100644 index 0000000000..379bbe470a --- /dev/null +++ b/.github/workflows/clang-pr.yml @@ -0,0 +1,20 @@ +name: clang-format PR +on: [push] +jobs: + formatting-check: + runs-on: ubuntu-24.04 + steps: + - uses: actions/checkout@v4 + - name: Install Dependance + run: | + sudo apt install clang-format make + - name: Run clang-format style check for C/C++/Protobuf programs. + run: | + clang-format --version + python tools/format.py + - name: Create Pull Request + uses: peter-evans/create-pull-request@v7 + with: + commit-message: clang format + title: Applid Clang format on the branch + branch: clang-format