-
-
Notifications
You must be signed in to change notification settings - Fork 205
37 lines (33 loc) · 1.18 KB
/
clang-format.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
name: clang-format
on:
workflow_dispatch:
inputs:
commit_changes:
# actions run ID
description: 'Commit clang-format changes?'
# Default value if no value is explicitly provided
default: 'false'
# Input has to be provided for the workflow to run
required: false
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Run clang-format lint
uses: DoozyX/[email protected]
with:
source: './core ./extensions ./tests ./templates'
exclude: './thidrparty ./extensions/fairygui ./extensions/scripting/lua-bindings/auto ./extensions/spine ./tests/fairygui-tests ./extensions/**/*_generated.h'
extensions: 'h,cpp,c,mm'
clangFormatVersion: 17
inplace: True
- name: Commit clang-format changes
if: ${{ github.event.inputs.commit_changes == 'true' }}
uses: EndBug/add-and-commit@v9
with:
committer_name: GitHub Actions
committer_email: 41898282+github-actions[bot]@users.noreply.github.com
message: 'Committing clang-format changes'
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}