Skip to content

Commit

Permalink
Fix ODH notebooks sync workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
abhijeet-dhumal committed Jun 27, 2024
1 parent 713d011 commit d74a88a
Showing 1 changed file with 22 additions and 2 deletions.
24 changes: 22 additions & 2 deletions .github/workflows/odh-notebooks-sync.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,6 @@ jobs:
uses: actions/setup-python@v4
with:
python-version: |
3.8
3.9
- name: Install pipenv and pip-versions
Expand Down Expand Up @@ -92,7 +91,28 @@ jobs:
for dir in "${directories[@]}"; do
counter=$((counter+1))
echo "--Processing directory $counter '$dir' of total $total"
cd "$dir" && pipenv install ${package_name}~="${CODEFLARE_RELEASE_VERSION}" && pipenv --rm && cd -
cd "$dir"
pipfile_python_version=$(grep -E '^python_version' ./Pipfile | cut -d '"' -f 2)
if [[ "$pipfile_python_version" > 3.8 ]]; then
#install specified package
if ! pipenv install ${package_name}~="${CODEFLARE_RELEASE_VERSION}"; then
echo "Failed to install ${package_name} with version ${CODEFLARE_RELEASE_VERSION} in $dir"
# exit 1
fi
# Lock dependencies, ensuring pre-release are included and clear previous state
if ! pipenv lock --pre --clear ; then
echo "Failed to lock dependencies"
# exit 1
fi
# remove virtual env and clear cache
if ! penv --rm --clear ; then
echo "Failed to remove virtual environment"
# exit 1
fi
else
echo "Skipped installtion of ${package_name} with version ${CODEFLARE_RELEASE_VERSION} in $dir"
fi
cd -
echo "$((total-counter)) directories remaining.."
done
else
Expand Down

0 comments on commit d74a88a

Please sign in to comment.