File tree Expand file tree Collapse file tree 1 file changed +47
-0
lines changed
Expand file tree Collapse file tree 1 file changed +47
-0
lines changed Original file line number Diff line number Diff line change 1+ name : Format
2+
3+ on :
4+ push :
5+ branches :
6+ - main
7+ paths :
8+ - ' utils/**'
9+ pull_request :
10+ branches :
11+ - main
12+ paths :
13+ - ' utils/**'
14+
15+ jobs :
16+ format :
17+ name : Run Ruff and isort
18+ runs-on : ubuntu-latest
19+
20+ steps :
21+ - name : Checkout repository
22+ uses : actions/checkout@v4
23+
24+ - name : Set up Python
25+ uses : actions/setup-python@v4
26+ with :
27+ python-version : ' 3.x'
28+
29+ - name : Install dependencies
30+ run : |
31+ pip install ruff isort
32+
33+ - name : Run Ruff formatter
34+ run : |
35+ ruff format utils/
36+
37+ - name : Run isort
38+ run : |
39+ isort utils/
40+
41+ - name : Commit and push changes
42+ run : |
43+ git config --global user.name "github-actions[bot]"
44+ git config --global user.email "github-actions[bot]@users.noreply.github.com"
45+ git add utils/
46+ git commit -m "Auto-format: Applied ruff format and isort" || exit 0
47+ git push
You can’t perform that action at this time.
0 commit comments