File tree Expand file tree Collapse file tree 2 files changed +18
-14
lines changed Expand file tree Collapse file tree 2 files changed +18
-14
lines changed Original file line number Diff line number Diff line change @@ -18,9 +18,8 @@ on: # yamllint disable-line rule:truthy
18
18
default : ' 3.11'
19
19
type : choice
20
20
options :
21
+ - ' 3.12'
21
22
- ' 3.11'
22
- - ' 3.9'
23
- - ' 3.8'
24
23
update_optional_dirs :
25
24
description : ' Include optional directories in update'
26
25
required : false
45
44
uses : actions/checkout@v4
46
45
with :
47
46
ref : ${{ env.BRANCH }}
48
- token : ${{ secrets.GH_ACCESS_TOKEN }}
47
+ token : ${{ secrets.GITHUB_TOKEN }}
49
48
50
49
# Configure Git
51
50
- name : Configure Git
69
68
uv lock --python ${{ env.PYTHON_VERSION }}
70
69
git add uv.lock
71
70
git commit -m "Update uv.lock files by uvlock-renewal.yaml action"
72
- git push origin ${{ env.BRANCH }}
71
+ git push origin ${{ env.BRANCH }}
Original file line number Diff line number Diff line change @@ -7,17 +7,22 @@ set -Eeuxo pipefail
7
7
# The following will create an extra requirement.txt file for every Pipfile.lock we have.
8
8
uv --version || pip install uv
9
9
cd jupyter
10
- find . -name requirements.txt -execdir bash -c '
11
- full_path=$(pwd)
10
+ find . -name " requirements.txt" -type f > files.txt
11
+ cd ..
12
+ while read -r file; do
12
13
13
- echo "# Generated by /scripts/sync-requirements-txt.sh from uv.lock" > requirements.txt
14
- echo >> requirements.txt
14
+ echo " Processing $file "
15
+ path=" ${file# ./* } "
16
+ image_name=" ${path%/*/* } "
17
+ python_version=" ${path%/* } "
18
+ python_version=" ${python_version##* -} "
15
19
16
- temp_dir="${full_path%/*}"
17
- image_name="${temp_dir##*/}"
18
-
19
- if [[ "$full_path" == *"/rocm/"* ]]; then
20
- image_name="${image_name}-rocm"
20
+ if [[ " $path " == * " rocm/" * ]]; then
21
+ image_name=" ${image_name#*/ } -rocm"
21
22
fi
23
+
24
+ uv pip compile --format requirements.txt --python ${python_version} -o jupyter/${path} --generate-hashes --group jupyter-${image_name} -image --no-annotate -q
25
+
26
+ done < jupyter/files.txt
22
27
23
- uv export --format requirements-txt --group jupyter-${image_name}-image >> requirements .txt' \;
28
+ rm jupyter/files .txt
You can’t perform that action at this time.
0 commit comments