diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index c33ea1be..138fed62 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -32,8 +32,11 @@ jobs: if: ${{ matrix.runs-on != 'windows-latest' }} run: | # Install org.neuroml.model.injectingplugin - export main_repo_branch=${GITHUB_REF##*/} + + export main_repo_branch=${{env.main_repo_branch}} + if [[ ${main_repo_branch} != "master" && ${main_repo_branch} != "development" && ${main_repo_branch} != "experimental" && ${main_repo_branch} != *"osb"* ]]; then main_repo_branch=development ; fi echo Using branch $main_repo_branch + git clone https://github.com/NeuroML/org.neuroml.model.injectingplugin.git cd org.neuroml.model.injectingplugin git checkout $main_repo_branch @@ -41,8 +44,6 @@ jobs: cd .. # Install NeuroML2 - export main_repo_branch=${GITHUB_REF##*/} - echo Using branch $main_repo_branch git clone https://github.com/NeuroML/NeuroML2.git cd NeuroML2 git checkout $main_repo_branch @@ -58,10 +59,14 @@ jobs: if: ${{ matrix.runs-on == 'windows-latest' }} run: | # Install org.neuroml.model.injectingplugin - echo Using branch $env:GITHUB_REF_NAME + + $env:main_repo_branch=$env:GITHUB_REF_NAME + if ( $env:main_repo_branch -ne "master" -and $env:main_repo_branch -ne "development" -and $env:main_repo_branch -ne "experimental" -and $env:main_repo_branch -notlike '*osb*' ) { $env:main_repo_branch="development" } + echo "Using branch $env:main_repo_branch..." + git clone https://github.com/NeuroML/org.neuroml.model.injectingplugin.git cd org.neuroml.model.injectingplugin - git checkout $env:GITHUB_REF_NAME + git checkout $env:main_repo_branch mvn install cd .. @@ -69,7 +74,7 @@ jobs: echo Using branch $env:GITHUB_REF_NAME git clone https://github.com/NeuroML/NeuroML2.git cd NeuroML2 - git checkout $env:GITHUB_REF_NAME + git checkout $env:main_repo_branch mvn install cd ..