Add code style enforcement to github workflow
This commit is contained in:
24
.github/workflows/auto-format.yml
vendored
Normal file
24
.github/workflows/auto-format.yml
vendored
Normal file
@@ -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: '.'
|
||||
Reference in New Issue
Block a user