Skip to content

Commit 580ad29

Browse files
committed
Add workflow to keep Ruff version up to date
1 parent a9dc65f commit 580ad29

File tree

1 file changed

+37
-0
lines changed

1 file changed

+37
-0
lines changed

Diff for: .github/workflows/ruff-version.yml

+37
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
name: ruff
2+
3+
on:
4+
pull_request:
5+
paths:
6+
- "{{cookiecutter.project_slug}}/requirements/local.txt"
7+
8+
permissions:
9+
contents: write
10+
pull-requests: write
11+
12+
jobs:
13+
version:
14+
runs-on: ubuntu-latest
15+
env:
16+
GH_PAT: ${{ secrets.GH_PAT }}
17+
steps:
18+
- name: Checkout with token
19+
uses: actions/checkout@v4
20+
if: ${{ env.GH_PAT != '' }}
21+
with:
22+
token: ${{ env.GH_PAT }}
23+
ref: ${{ github.head_ref }}
24+
25+
- name: Checkout without token
26+
uses: actions/checkout@v4
27+
if: ${{ env.GH_PAT == '' }}
28+
with:
29+
ref: ${{ github.head_ref }}
30+
31+
- uses: astral-sh/setup-uv@v5
32+
33+
- run: uv run scripts/ruff_version.py
34+
35+
- uses: stefanzweifel/git-auto-commit-action@v5
36+
with:
37+
commit_message: Align Ruff versions

0 commit comments

Comments
 (0)