Skip to content

Add suggest change action #26

Add suggest change action

Add suggest change action #26

name: Check Clang-Format on Diff
on: [push, pull_request]
jobs:
clang-format:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Import LLVM GPG Key
run: |
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 15CF4D18AF4F7421
- name: Add LLVM Repository
run: |
sudo add-apt-repository "deb http://apt.llvm.org/jammy llvm-toolchain-jammy-17 main"
sudo apt-get update
- name: Install clang-format 17
run: |
sudo apt-get install clang-format-17
- name: Check clang-format on Diff
run: |
./clang-format-diff.sh ${{ github.base_ref }} ${{ github.ref }}
- name: Suggest changes from clang-format
if: github.event_name == 'pull_request'
uses: parkerbxyz/suggest-changes@v1
with:
comment: 'Please commit the suggested changes from clang-format.'