Skip to content

Commit b54b709

Browse files
Add app formatting
1 parent 572236c commit b54b709

1 file changed

Lines changed: 33 additions & 0 deletions

File tree

.github/workflows/format-app.yml

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
name: Format App
2+
3+
on:
4+
push:
5+
branches: [master, develop]
6+
7+
jobs:
8+
format:
9+
runs-on: ubuntu-latest
10+
steps:
11+
- name: Checkout code
12+
uses: actions/checkout@v4
13+
with:
14+
token: ${{ secrets.GITHUB_TOKEN }}
15+
16+
- name: Set up Python
17+
uses: actions/setup-python@v5
18+
with:
19+
python-version: '3.9'
20+
21+
- name: Install ruff
22+
run: pip install ruff
23+
24+
- name: Run ruff format
25+
run: ruff format packet
26+
27+
- name: Commit and push changes
28+
run: |
29+
git config --global user.name "github-actions[bot]"
30+
git config --global user.email "github-actions[bot]@users.noreply.github.com"
31+
git add .
32+
git diff --cached --quiet || git commit -m "Auto-format code with ruff"
33+
git push

0 commit comments

Comments
 (0)