1+ name : Sync uv.lock
2+
3+ on :
4+ # this is for test_only
5+ pull_request :
6+ schedule :
7+ # Every Monday at 03:00 UTC; adjust as needed
8+ - cron : " 0 3 * * 1"
9+ push :
10+ branches : [main]
11+ paths :
12+ - ' pyproject.toml'
13+ - ' setup.py'
14+ workflow_dispatch : # allow manual runs
15+
16+ permissions :
17+ contents : read
18+ pull-requests : read
19+
20+ jobs :
21+ sync-uv-lock :
22+ # runs-on: ubuntu-latest
23+ runs-on : linux.g5.4xlarge.nvidia.gpu
24+ container :
25+ image : pytorch/manylinux2_28-builder:cuda13.0
26+ options : --gpus all
27+ env :
28+ CUDA_VERSION : 13.0
29+ CUDA_HOME : /usr/local/cuda
30+
31+ steps :
32+ - name : Checkout
33+ uses : actions/checkout@v4
34+ with :
35+ fetch-depth : 0
36+ token : ${{ secrets.UV_LOCK_PR_TOKEN }}
37+
38+ - name : Install uv
39+ uses : astral-sh/setup-uv@v3
40+ with :
41+ version : " latest"
42+
43+ - name : Install bazel
44+ run : |
45+ set -euo pipefail
46+ set -x
47+ curl -L https://github.com/bazelbuild/bazelisk/releases/download/v1.26.0/bazelisk-linux-amd64 \
48+ -o bazelisk-linux-amd64 \
49+ && mv bazelisk-linux-amd64 /usr/local/bin/bazel \
50+ && chmod +x /usr/local/bin/bazel
51+ bazel --version
52+
53+ - name : UV lock and check for changes
54+ id : check-changes
55+ working-directory : ${{ github.workspace }}
56+ run : |
57+ set -euo pipefail
58+ set -x
59+ git config --global safe.directory "$GITHUB_WORKSPACE"
60+
61+ if ! uv lock; then
62+ echo "Error: Failed to update uv.lock"
63+ exit 1
64+ fi
65+ echo "successfully ran uv lock"
66+ if git diff --quiet uv.lock; then
67+ echo "No changes to uv.lock"
68+ exit 0
69+ fi
70+ echo "has_changes=true" >> "$GITHUB_OUTPUT"
71+ echo "there is changes to the uv.lock file"
72+
73+ - name : Create Pull Request
74+ if : steps.check-changes.outputs.has_changes == 'true'
75+ uses : peter-evans/create-pull-request@v5
76+ with :
77+ token : ${{ secrets.UV_LOCK_PR_TOKEN }}
78+ commit-message : " chore: update uv.lock"
79+ base : ${{ github.event_name == 'pull_request' && github.base_ref || github.ref_name }}
80+ title : " uv.lock file updates"
81+ body : |
82+ ## Summary
83+ Automated update of UV lockfiles to ensure all dependencies are current.
84+
85+ ### Changes include:
86+ - Updated dependency versions in `uv.lock`
87+
88+ ### Next Steps:
89+ - Review the updated dependencies
90+ - Run CI to ensure no breaking changes
91+ - Merge if all tests pass
92+
93+ ---
94+
95+ *Auto-generated by [uv-update](.github/workflows/uv-update.yml) workflow*
96+ branch : " update/uv-lockfiles-${{ github.run_id }}"
97+ delete-branch : true
98+ assignees : " "
99+ reviewers : " "
100+ draft : false
101+
102+ concurrency :
103+ group : ${{ github.workflow }}-uv-update-${{ github.event.pull_request.number || github.ref_name }}-${{ github.event_name == 'workflow_dispatch' }}
104+ cancel-in-progress : true
0 commit comments