Skip to content

Commit 70e4cc5

Browse files
committed
try separate bot workflow for lock upgrade
1 parent bf1942f commit 70e4cc5

2 files changed

Lines changed: 21 additions & 0 deletions

File tree

.github/workflows/bot.yaml

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,25 @@ permissions:
1010
pull-requests: write
1111

1212
jobs:
13+
uv-lock:
14+
runs-on: ubuntu-latest
15+
if: github.repository == 'mscheltienne/template-python' # prevent running on forks
16+
steps:
17+
- uses: actions/checkout@v4
18+
with:
19+
token: ${{ secrets.GITHUB_TOKEN }}
20+
- uses: astral-sh/setup-uv@v6
21+
- run: uv lock --upgrade
22+
- name: Commit changes
23+
run: |
24+
git config --local user.name 'github-actions[bot]'
25+
git config --local user.email 'github-actions[bot]@users.noreply.github.com'
26+
git add uv.lock
27+
git diff --staged --quiet || git commit -m "Update uv.lock"
28+
git push
29+
1330
auto-merge:
31+
needs: uv-lock
1432
runs-on: ubuntu-latest
1533
if: (github.event.pull_request.user.login == 'dependabot[bot]' || github.event.pull_request.user.login == 'pre-commit-ci[bot]') && github.repository == 'mscheltienne/template-python'
1634
steps:

.pre-commit-config.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
ci:
2+
skip: [uv-lock]
3+
14
repos:
25
- repo: https://github.com/astral-sh/uv-pre-commit
36
rev: 0.7.12

0 commit comments

Comments
 (0)