forked from spelunky-fyi/overlunky
-
Notifications
You must be signed in to change notification settings - Fork 1
43 lines (40 loc) · 1.36 KB
/
clang_format_verify.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
name: Clang-Format Lint
on:
push:
branches: [main]
pull_request:
branches: [main]
workflow_dispatch:
inputs:
do_formatting:
description: "Run clang-format inplace formatting and commit the result"
required: true
default: "false"
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: DoozyX/[email protected]
if: ${{ github.event_name != 'workflow_dispatch' || github.event.inputs.do_formatting != 'true' }}
with:
source: "src"
extensions: "inl,h,hpp,cpp"
exclude: "./src/game_api/lua_libs"
clangFormatVersion: 15
- uses: DoozyX/[email protected]
if: ${{ github.event_name == 'workflow_dispatch' && github.event.inputs.do_formatting == 'true' }}
with:
source: "src"
extensions: "inl,h,hpp,cpp"
exclude: "./src/game_api/lua_libs"
clangFormatVersion: 15
inplace: true
- uses: EndBug/add-and-commit@v4
if: ${{ success() && github.event_name == 'workflow_dispatch' && github.event.inputs.do_formatting == 'true' }}
with:
author_name: Clang-Format Bot
author_email: [email protected]
message: "Automated clang-format changes"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}