mirror of
https://seed.radicle.dev/rad:z6cFWeWpnZNHh9rUW8phgA3b5yGt.git
synced 2026-10-27 15:20:34 +08:00
fix CI errors on main branch
When CI runs on main branch, the workflow fails to create the "main" branch as it exists already. Fix: uses "-f" to force creating "main" branch.
This commit is contained in:
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user