Skip to content

Gh action clang pr

Gh action clang pr #5

Workflow file for this run

name: "Check Clang Format"
on: [push, pull_request]
jobs:
clang-format:
name: "Clang Formatter"
runs-on: ubuntu-latest
steps:
- name: "Checkout ${{ github.ref }} ( ${{ github.sha }} )"
uses: actions/checkout@v3
with:
persist-credentials: false
submodules: recursive
- name: Paths filter
uses: dorny/paths-filter@master
id: filter
with:
filters: |
file_changed:
- "**/*.cpp"
- "**/*.c"
- "**/*.h"
- "**/*.hpp"
- "**/*.cxx"
- name: "Format it!"
if: ${{ steps.filter.outputs.file_changed == 'true' }}
uses: DoozyX/clang-format-lint-action@master
id: check_format
with:
source: "./"
clangFormatVersion: 14
inplace: False
style: "file"
- name: Ignore it!
if: ${{ steps.filter.outputs.be_changes == 'false' }}
run: echo 'No need to check.'