From c96f724ac92cbc01a589bdf379a469ed9486ee68 Mon Sep 17 00:00:00 2001 From: Marina Gourtovaia Date: Mon, 4 Dec 2023 11:55:42 +0000 Subject: [PATCH] Updated branch for dependencies on push. --- .github/workflows/run-tests.yml | 4 ++-- scripts/install_wsi_dependencies.sh | 11 ++++++++++- 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/.github/workflows/run-tests.yml b/.github/workflows/run-tests.yml index e18cba94..5e76c9ab 100644 --- a/.github/workflows/run-tests.yml +++ b/.github/workflows/run-tests.yml @@ -14,8 +14,8 @@ jobs: PERL_CACHE: ~/perl5 # Perlbrew and CPAN modules installed here, cached NPG_LIB: ~/perl5npg # NPG modules installed here, not cached WSI_NPG_GITHUB_URL: https://github.com/wtsi-npg - WSI_NPG_BUILD_BRANCH: ${{ github.base_ref || github.ref }} - + WSI_NPG_BUILD_BRANCH: ${{ github.base_ref}} + WSI_NPG_GITHUB_REPO_OWNER: ${{ github.repository_owner }} strategy: matrix: diff --git a/scripts/install_wsi_dependencies.sh b/scripts/install_wsi_dependencies.sh index 975a3c15..78a20967 100755 --- a/scripts/install_wsi_dependencies.sh +++ b/scripts/install_wsi_dependencies.sh @@ -3,7 +3,16 @@ set -e -u -x WSI_NPG_GITHUB_URL=${WSI_NPG_GITHUB_URL:=https://github.com/wtsi-npg} -WSI_NPG_BUILD_BRANCH=${WSI_NPG_BUILD_BRANCH:=devel} +# WSI_NPG_BUILD_BRANCH is undefined outside of pull request, ie on push. +if [ -z ${WSI_NPG_BUILD_BRANCH} ] +then + if [ "$WSI_NPG_GITHUB_REPO_OWNER" = "wtsi-npg" ] + then + WSI_NPG_BUILD_BRANCH=master + else + WSI_NPG_BUILD_BRANCH=devel + fi +fi # The first argument is the install base for NPG modules, enabling them to be # installed independently of CPAN dependencies. E.g. for cases where we want