mirror of
https://github.com/OPM/ResInsight.git
synced 2024-12-29 10:21:54 -06:00
gha: Check formatting using clang-format on push
This commit is contained in:
parent
03ac01d049
commit
64a719b1f4
23
.github/workflows/clang-format.yml
vendored
Normal file
23
.github/workflows/clang-format.yml
vendored
Normal file
@ -0,0 +1,23 @@
|
||||
name: clang-format
|
||||
|
||||
on: [push, pull_request]
|
||||
|
||||
jobs:
|
||||
clang-format-job:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Install clang-format 6.0
|
||||
run: |
|
||||
sudo apt install clang-format-6.0
|
||||
clang-format-6.0 --version
|
||||
- uses: actions/checkout@v2
|
||||
- name: Check format
|
||||
run: |
|
||||
cd ApplicationCode
|
||||
find -name "*.h" -o -name "*.cpp" -o -name "*.inl" | xargs clang-format-6.0 -i
|
||||
git diff
|
||||
- uses: peter-evans/create-pull-request@v2
|
||||
with:
|
||||
token: ${{ secrets.GITHUB_TOKEN }}
|
||||
commit-message: 'Fixes by clang-format'
|
||||
title: 'Fixes by clang-format'
|
Loading…
Reference in New Issue
Block a user