forked from Xeeynamo/sotn-decomp
-
Notifications
You must be signed in to change notification settings - Fork 0
38 lines (36 loc) · 854 Bytes
/
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
38
name: Format code
on:
push:
branches:
- master
paths:
- '*/*.c'
- '*/*.h'
- '**/*.c'
- '**/*.h'
- '**/*.py'
- 'config/symbols.*.txt'
workflow_dispatch:
jobs:
format:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: Install requirements
run: sudo apt-get install clang-format
- name: Install python
uses: actions/setup-python@v5
with:
python-version: '3.10'
- name: Install black
run: pip install black pyyaml mapfile-parser==2.1.4
- name: Clone main repository
uses: actions/checkout@v4
with:
submodules: false
- name: Format code
run: make format
- uses: stefanzweifel/git-auto-commit-action@v5
with:
commit_message: Format code