Skip to content

Commit

Permalink
Merge pull request #3337 from mashehu/fix-init-branch-in-sync-action
Browse files Browse the repository at this point in the history
set git defaultBranch to master in sync action
  • Loading branch information
mashehu authored Dec 10, 2024
2 parents a791707 + 5ee2d52 commit 0e7c870
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
8 changes: 8 additions & 0 deletions .github/workflows/sync.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down

0 comments on commit 0e7c870

Please sign in to comment.