-
Notifications
You must be signed in to change notification settings - Fork 1
32 lines (31 loc) · 1.11 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
name: clang-format
on: [pull_request]
jobs:
clang-format:
if: startsWith(github.head_ref, 'clang-format-patches') == false && github.event.pull_request.head.repo.full_name == github.repository
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
ref: ${{ github.head_ref }}
- name: clang-format
id: clang-format
uses: DoozyX/[email protected]
with:
source: './src'
# exclude: ''
extensions: 'h,cpp,c,hpp'
clangFormatVersion: 14
inplace: True
- name: Set clang-format branch name
id: vars
run: echo ::set-output name=branch-name::"clang-format-patches/${{ github.head_ref }}"
- name: Create Pull Request
uses: peter-evans/create-pull-request@v3
with:
commit-message: clang-format action fixes
title: Fixes by clang-format action
body: This is an auto-generated PR with fixes by clang-format.
labels: clang-format, automated pr
reviewers: peter-evans
branch: ${{ steps.vars.outputs.branch-name }}