-
Notifications
You must be signed in to change notification settings - Fork 11
47 lines (40 loc) · 1.25 KB
/
update-bot.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
name: update-bot
# dependabot doesn't support uv lock, yet
# using workaround from https://github.com/EdmundGoodman/update-bot/
# Usage:
# In your repository's "Settings>Actions>General" menu (https://github.com/USER/REPO/settings/actions),
# select the "Allow GitHub Actions to create and approve pull requests" checkbox at the bottom of the page
on:
workflow_dispatch:
# Set the schedule, at 08:00 on day-of-month 1
schedule:
- cron: 0 8 1 * *
permissions:
contents: write
pull-requests: write
jobs:
lock:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: astral-sh/setup-uv@v5
with:
enable-cache: true
cache-dependency-glob: |
**/pyproject.toml
- run: |
echo "\`\`\`" > uv_output.md
uv lock --upgrade &>> uv_output.md
echo "\`\`\`" >> uv_output.md
- name: Create pull request
uses: peter-evans/create-pull-request@v7
with:
token: ${{ secrets.GITHUB_TOKEN }}
commit-message: Update uv lockfile
title: Update uv lockfile
body-path: uv_output.md
branch: update-uv
base: main
labels: install
delete-branch: true
add-paths: uv.lock