diff --git a/.github/workflows/run_jcb_basic_testing.yaml b/.github/workflows/run_jcb_basic_testing.yaml index 9f0a745..97714eb 100644 --- a/.github/workflows/run_jcb_basic_testing.yaml +++ b/.github/workflows/run_jcb_basic_testing.yaml @@ -28,7 +28,7 @@ jobs: - name: Add repo url to the environment run: | - JCB_APP_REPO="https://github.com/${{ github.repository }}" + JCB_APP_REPO="${{ github.repository }}" echo "JCB_APP_REPO=${JCB_APP_REPO}" >> $GITHUB_ENV - name: Determine the name of the client branch @@ -63,12 +63,16 @@ jobs: cd jcb_repo pip install pyyaml ./jcb_client_init.py - echo "JCB_APP_REPO: ${{ github.repository }}" - echo "Currect directory: $(pwd)" - app_path=$(python jcb_client_path.py ${{ github.repository }}) - echo "Application path: $app_path" - cd $app_path - git checkout ${{ env.JCB_APP_BRANCH }} + + # If all the branches are found then at this point everything should be good since + # jcb_client_init will check out the correct branches. If not then the app branch needs to + # be checked out explicitly. + if [ "${{ env.JCB_BRANCH }}" != "${{ env.JCB_APP_BRANCH }}" ]; then + echo "Checking out branch ${{ env.JCB_APP_BRANCH }} for ${{ env.JCB_APP_REPO }}" + app_path=$(python jcb_client_path.py $JCB_APP_REPO) + cd $app_path + git checkout ${{ env.JCB_APP_BRANCH }} + fi - name: Install dependencies run: |