Skip to content

Commit d896766

Browse files
authored
ci: Add workflow for uv lock file maintenance (#745)
1 parent 44c0e48 commit d896766

File tree

1 file changed

+38
-0
lines changed

1 file changed

+38
-0
lines changed
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
name: uv lock file maintenance
2+
3+
on:
4+
pull_request:
5+
paths:
6+
- "pyproject.toml"
7+
8+
permissions:
9+
contents: write
10+
pull-requests: write
11+
12+
jobs:
13+
lock:
14+
runs-on: ubuntu-latest
15+
steps:
16+
- uses: actions/checkout@v4
17+
with:
18+
token: ${{ secrets.GH_PAT }}
19+
20+
- uses: astral-sh/setup-uv@v6
21+
with:
22+
enable-cache: true
23+
24+
- name: "Run uv lock command"
25+
run: uv lock
26+
27+
- uses: stefanzweifel/git-auto-commit-action@v5
28+
id: auto-commit-action
29+
with:
30+
commit_message: Regenerate uv.lock
31+
32+
- name: "Run if changes have been detected"
33+
if: steps.auto-commit-action.outputs.changes_detected == 'true'
34+
run: echo "Changes!"
35+
36+
- name: "Run if no changes have been detected"
37+
if: steps.auto-commit-action.outputs.changes_detected == 'false'
38+
run: echo "No Changes!"

0 commit comments

Comments
 (0)