diff --git a/.github/workflows/sync.yml b/.github/workflows/sync.yml index 625f00d24..b0464d274 100644 --- a/.github/workflows/sync.yml +++ b/.github/workflows/sync.yml @@ -87,6 +87,14 @@ jobs: with: version: "latest-everything" + - name: Set Git default branch from nextflow.config and set git default branch to that or "master" + run: | + defaultBranch=$(grep -B5 -A5 "nextflowVersion" nextflow.config | grep "defaultBranch" | cut -d"=" -f2) + if [ -z "$defaultBranch" ]; then + defaultBranch="master" + fi + git config --global init.defaultBranch $defaultBranch + - name: Run synchronisation if: github.repository == 'nf-core/tools' env: diff --git a/CHANGELOG.md b/CHANGELOG.md index 4eef49da4..73760131f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -65,6 +65,7 @@ - Don't break gitpod.yml with template string ([#3332](https://github.com/nf-core/tools/pull/3332)) - rocrate: remove duplicated entries for name and version ([#3333](https://github.com/nf-core/tools/pull/3333)) - rocrate: Update crate with version bump and handle new contributor field ([#3334](https://github.com/nf-core/tools/pull/3334)) +- Set git defaultBranch to master in sync action ([#3337](https://github.com/nf-core/tools/pull/3337)) ### Version updates