Skip to content

Commit 3918149

Browse files
committed
better
1 parent 55a058d commit 3918149

1 file changed

Lines changed: 26 additions & 2 deletions

File tree

.github/workflows/bot.yaml

Lines changed: 26 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,42 @@
11
name: bot
22
concurrency:
3-
group: ${{ github.workflow }}-${{ github.event.number }}
3+
group: ${{ github.workflow }}-${{ github.event.number }}-${{ github.event.ref }}
44
cancel-in-progress: true
55
on: # yamllint disable-line rule:truthy
66
pull_request:
7+
schedule:
8+
- cron: '0 3 * * *'
9+
workflow_dispatch:
710

811
permissions:
912
contents: write
1013
pull-requests: write
1114

1215
jobs:
13-
auto-merge:
16+
uv-lock:
17+
if: ${{ github.event_name == 'schedule' || github.event_name == 'workflow_dispatch' }}
1418
runs-on: ubuntu-latest
19+
steps:
20+
- uses: actions/create-github-app-token@v2
21+
id: app-token
22+
with:
23+
app-id: ${{ secrets.UV_LOCK_UPGRADER_APP_ID }}
24+
private-key: ${{ secrets.UV_LOCK_UPGRADER_APP_PRIVATE_KEY }}
25+
- uses: actions/checkout@v4
26+
- uses: astral-sh/setup-uv@v6
27+
- run: uv lock --upgrade
28+
- uses: peter-evans/create-pull-request@v7
29+
with:
30+
token: ${{ steps.app-token.outputs.token }}
31+
commit-message: "chore: upgrade uv.lock"
32+
title: "chore: upgrade uv.lock"
33+
body: This PR updates the uv.lock file with the latest dependency versions.
34+
branch: update-uv-lock
35+
delete-branch: true
36+
37+
auto-merge:
1538
if: ${{ github.event_name == 'pull_request' && (github.event.pull_request.user.login == 'dependabot[bot]' || github.event.pull_request.user.login == 'pre-commit-ci[bot]' || github.event.pull_request.user.login == 'github-actions[bot]') }}
39+
runs-on: ubuntu-latest
1640
steps:
1741
- name: Enable auto-merge for bot PRs
1842
run: gh pr merge --auto --squash "$PR_URL"

0 commit comments

Comments
 (0)