From bdedaff807e4906d6ff000ff3c6c0c65e40e298f Mon Sep 17 00:00:00 2001 From: Jan Stourac Date: Sat, 28 Sep 2024 13:06:56 +0200 Subject: [PATCH] Fix for the odh-notebook-sync workflow. This is a followup of #655 where the Pipfile.cpu and Pipfile.gpu support was broken. Apart from that - the array initialization was fixed and the link to this workflow is added to the raised PR description. --- .github/workflows/odh-notebooks-sync.yml | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/.github/workflows/odh-notebooks-sync.yml b/.github/workflows/odh-notebooks-sync.yml index 80337fe0a..f1a9e0fe1 100644 --- a/.github/workflows/odh-notebooks-sync.yml +++ b/.github/workflows/odh-notebooks-sync.yml @@ -55,12 +55,12 @@ jobs: - name: Update Pipfiles in accordance with Codeflare-SDK latest release run: | package_name=codeflare-sdk - available_python_versions=("3.9", "3.11") # add space separated python versions according to 'python-versions' specified in 'Setup Python Environment' step + available_python_versions=("3.9" "3.11") # add space separated python versions according to 'python-versions' specified in 'Setup Python Environment' step install_package_using_pipenv(){ # args allow custom names for Pipfile and Pipfile.lock - if $# -eq 2; then - mv $1 Pipfile - mv $2 Pipfile.lock + if [ $# -eq 2 ]; then + mv "${1}" Pipfile + mv "${2}" Pipfile.lock fi if ! pipenv install ${package_name}~="${CODEFLARE_RELEASE_VERSION}"; then echo "Failed to install ${package_name} with version ${CODEFLARE_RELEASE_VERSION} in $dir" @@ -76,9 +76,9 @@ jobs: echo "Failed to remove virtual environment" exit 1 fi - if $# -eq 2; then - mv Pipfile $1 - mv Pipfile.lock $2 + if [ $# -eq 2 ]; then + mv Pipfile "${1}" + mv Pipfile.lock "${2}" fi } # Get the list of available versions for the package @@ -153,6 +153,6 @@ jobs: env: pr_title: "[Codeflare Action] Update notebook's pipfile to sync with Codeflare-SDK release ${{ env.CODEFLARE_RELEASE_VERSION }}" pr_body: | - :rocket: This is an automated Pull Request. + :rocket: This is an automated Pull Request generated by [odh-notebooks-sync.yml](https://github.com/project-codeflare/codeflare-sdk/blob/main/.github/workflows/odh-notebooks-sync.yml) workflow. This PR updates the `Pipfile` to sync with latest Codeflare-SDK release.