generated from Robotic-Decision-Making-Lab/ros2-template
-
Notifications
You must be signed in to change notification settings - Fork 2
34 lines (28 loc) · 740 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
name: Formatting (pre-commit)
on:
pull_request:
push:
branches:
- main
workflow_dispatch:
jobs:
pre-commit:
name: Format
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: "3.10"
- name: Install clang-format-14
run: sudo apt-get install clang-format-14
- name: Run pre-commit
uses: pre-commit/action@v3.0.1
id: precommit
- name: Upload pre-commit changes
if: failure() && steps.precommit.outcome == 'failure'
uses: rhaschke/upload-git-patch-action@main
with:
name: pre-commit