1 parent 2ae143f commit 9ff2ebaCopy full SHA for 9ff2eba
1 file changed
.github/workflows/format.yml
@@ -0,0 +1,29 @@
1
+name: Auto Format with Ruff
2
+
3
+on:
4
+ push:
5
+ branches:
6
+ - "main"
7
8
+permissions:
9
+ contents: write
10
11
+jobs:
12
+ format:
13
+ name: "Format with Ruff"
14
+ runs-on: "ubuntu-latest"
15
+ steps:
16
+ - name: Checkout the repository
17
+ uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
18
19
+ - name: Run Ruff formatter
20
+ uses: astral-sh/ruff-action@v3
21
+ with:
22
+ args: "format"
23
24
+ - name: Commit and push changes
25
+ uses: stefanzweifel/git-auto-commit-action@v5
26
27
+ commit_message: "chore: auto format with ruff"
28
+ commit_user_name: "github-actions[bot]"
29
+ commit_user_email: "github-actions[bot]@users.noreply.github.com"
0 commit comments