Skip to content

Commit b30d3a2

Browse files
ci: Add a script to automatically update uv.lock upon dependabot updates
1 parent d3c7511 commit b30d3a2

File tree

1 file changed

+30
-0
lines changed

1 file changed

+30
-0
lines changed

.github/workflows/lock-update.yml

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
name: Update uv.lock
2+
3+
on:
4+
pull_request:
5+
types: [ opened, synchronize ]
6+
paths:
7+
- 'pyproject.toml'
8+
9+
permissions:
10+
contents: write
11+
pull-requests: write
12+
13+
jobs:
14+
uv-lock-update:
15+
if: github.actor == 'dependabot[bot]'
16+
runs-on: ubuntu-latest
17+
steps:
18+
- uses: actions/checkout@v4
19+
with:
20+
token: ${{ secrets.GITHUB_TOKEN }}
21+
- name: Set up Python
22+
uses: actions/setup-python@v4
23+
with:
24+
python-version: '3.12'
25+
- name: Install uv
26+
run: make install-uv
27+
- run: uv lock
28+
- uses: stefanzweifel/git-auto-commit-action@v5
29+
with:
30+
commit_message: "chore: Refresh uv.lock"

0 commit comments

Comments
 (0)