Radish alpha
r
Git libraries for Radicle
Radicle
Git (anonymous pull)
Log in to clone via SSH
fix CI errors on main branch
Han Xu committed 3 years ago
commit 4f2962a7e8abde85aa2aed9b3a63f34d4c64a387
parent eb1653cdb71d19e2ba0d5c786baefc140cd52740
1 file changed +4 -4
modified .github/workflows/ci.yaml
@@ -85,10 +85,10 @@ jobs:
        with:
          fetch-depth: 0
      # The 'main' branch is needed for radicle-surf vcs::git::tests::test_submodule_failure,
-
      # however actions/checkout uses the default branch 'master' at this moment.
+
      # however actions/checkout uses the init.defaultBranch 'master' at this moment.
      # We will improve the test soon to remove this need.
-
      # - run: git branch main
-
      # - run: git branch -u origin/main main
+
      - run: git branch -f main  # -f in case of running against 'main' branch.
+
      - run: git branch -u origin/main main
      - uses: actions-rs/toolchain@v1
        with:
          profile: minimal
@@ -120,7 +120,7 @@ jobs:
      - uses: actions/checkout@master
        with:
          fetch-depth: 0
-
      - run: git branch main
+
      - run: git branch -f main
      - run: git branch -u origin/main main
      - uses: actions-rs/toolchain@v1
        with: