-
Notifications
You must be signed in to change notification settings - Fork 0
70 lines (54 loc) · 1.7 KB
/
update-deps.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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
name: Update PYTHON Dependencies
on:
schedule:
- cron: '0 7 * * *' # Runs every day at 7:00 AM
workflow_dispatch: # Allows manual triggering of the workflow
permissions:
contents: write
pull-requests: write
jobs:
update-deps:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: 3.12
- name: Install uv
uses: astral-sh/setup-uv@v2
- name: Use uv with Python version
run: uv venv --python 3.12
# - name: Install dependencies
# run: make install
- name: Save check dependencies output (before)
id: check_deps_before
run: |
BEFORE=$(make check-deps) || true
echo "BEFORE=${BEFORE}"
echo "BEFORE<<EOF" >> $GITHUB_ENV
echo "$BEFORE" >> $GITHUB_ENV
echo "EOF" >> $GITHUB_ENV
- name: Run make update
run: make update
- name: Run make check dependencies (after)
id: check_deps_after
run: |
after=$(make check-deps) || true
echo "AFTER=${AFTER}"
echo "AFTER<<EOF" >> $GITHUB_ENV
echo "$AFTER" >> $GITHUB_ENV
echo "EOF" >> $GITHUB_ENV
- name: Create or Update Pull Request
uses: peter-evans/create-pull-request@v7
with:
title: 'chore(deps): update python dependencies'
body: |
Automated update of uv.lock
**Before:**
${{env.BEFORE}}
**After:**
${{env.AFTER}}
base: main
branch: update-python-dependencies