Skip to content

Commit d74a88a

Browse files
Fix ODH notebooks sync workflow
1 parent 713d011 commit d74a88a

File tree

1 file changed

+22
-2
lines changed

1 file changed

+22
-2
lines changed

.github/workflows/odh-notebooks-sync.yml

+22-2
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,6 @@ jobs:
4444
uses: actions/setup-python@v4
4545
with:
4646
python-version: |
47-
3.8
4847
3.9
4948
5049
- name: Install pipenv and pip-versions
@@ -92,7 +91,28 @@ jobs:
9291
for dir in "${directories[@]}"; do
9392
counter=$((counter+1))
9493
echo "--Processing directory $counter '$dir' of total $total"
95-
cd "$dir" && pipenv install ${package_name}~="${CODEFLARE_RELEASE_VERSION}" && pipenv --rm && cd -
94+
cd "$dir"
95+
pipfile_python_version=$(grep -E '^python_version' ./Pipfile | cut -d '"' -f 2)
96+
if [[ "$pipfile_python_version" > 3.8 ]]; then
97+
#install specified package
98+
if ! pipenv install ${package_name}~="${CODEFLARE_RELEASE_VERSION}"; then
99+
echo "Failed to install ${package_name} with version ${CODEFLARE_RELEASE_VERSION} in $dir"
100+
# exit 1
101+
fi
102+
# Lock dependencies, ensuring pre-release are included and clear previous state
103+
if ! pipenv lock --pre --clear ; then
104+
echo "Failed to lock dependencies"
105+
# exit 1
106+
fi
107+
# remove virtual env and clear cache
108+
if ! penv --rm --clear ; then
109+
echo "Failed to remove virtual environment"
110+
# exit 1
111+
fi
112+
else
113+
echo "Skipped installtion of ${package_name} with version ${CODEFLARE_RELEASE_VERSION} in $dir"
114+
fi
115+
cd -
96116
echo "$((total-counter)) directories remaining.."
97117
done
98118
else

0 commit comments

Comments
 (0)