From 15b044d1b3a1a29b2406d42b5c791fd40e96ce9b Mon Sep 17 00:00:00 2001 From: mashehu Date: Tue, 10 Dec 2024 15:15:26 +0100 Subject: [PATCH] change working dir when setting defaultBranch --- .github/workflows/sync.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/sync.yml b/.github/workflows/sync.yml index 2a5066397..c315fdb14 100644 --- a/.github/workflows/sync.yml +++ b/.github/workflows/sync.yml @@ -89,10 +89,12 @@ jobs: - name: Set Git default branch from nextflow.config and set git default branch to that or "master" run: | - defaultBranch=$(grep -B5 -A5 "nextflowVersion" nf-core/${{ matrix.pipeline }}/nextflow.config | grep "defaultBranch" | cut -d"=" -f2) + cd nf-core/${{ matrix.pipeline }} + defaultBranch=$(grep -B5 -A5 "nextflowVersion" nextflow.config | grep "defaultBranch" | cut -d"=" -f2) if [ -z "$defaultBranch" ]; then defaultBranch="master" fi + echo "Default branch: $defaultBranch" git config --global init.defaultBranch $defaultBranch - name: Run synchronisation