From 6148983c8469149cda6e834998cc01c78102f418 Mon Sep 17 00:00:00 2001 From: mirpedrol Date: Wed, 11 Dec 2024 11:44:22 +0100 Subject: [PATCH] go back to original directory after configuring git defaultBranch --- .github/workflows/sync.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/sync.yml b/.github/workflows/sync.yml index 9a1158c3e..b45333114 100644 --- a/.github/workflows/sync.yml +++ b/.github/workflows/sync.yml @@ -94,7 +94,7 @@ jobs: - name: Set Git default branch from nextflow.config and set git default branch to that or "master" run: | - cd nf-core/${{ matrix.pipeline }} + pushd nf-core/${{ matrix.pipeline }} defaultBranch=$(grep -B5 -A5 "nextflowVersion" nextflow.config | grep "defaultBranch" | cut -d"=" -f2) if [ -z "$defaultBranch" ]; then defaultBranch="master" @@ -102,6 +102,7 @@ jobs: echo "Default branch: $defaultBranch" echo "defaultBranch=$defaultBranch" >> GITHUB_OUTPUT git config --global init.defaultBranch $defaultBranch + popd - name: Run synchronisation if: github.repository == 'nf-core/tools'