Skip to content

Commit f8ede16

Browse files
committed
ci: tweak rebase of v2 on main script
1 parent 05c7564 commit f8ede16

File tree

1 file changed

+11
-9
lines changed

1 file changed

+11
-9
lines changed

.github/workflows/rebase-v2-on-main.yml

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
name: rebase-v2-on-main
2+
13
on:
24
push:
35
branches:
@@ -6,10 +8,6 @@ on:
68
workflow_dispatch:
79

810
env:
9-
VSTEST_CONNECTION_TIMEOUT: 180
10-
DOTNET_SKIP_FIRST_TIME_EXPERIENCE: 1
11-
DOTNET_NOLOGO: true
12-
DOTNET_SYSTEM_CONSOLE_ALLOW_ANSI_COLOR_REDIRECTION: 1
1311
TERM: xterm
1412

1513
jobs:
@@ -38,16 +36,16 @@ jobs:
3836
git config --global user.signingkey ${{ steps.import_gpg.outputs.keyid }}
3937
git config --global commit.gpgsign true
4038
41-
- name: Merge stable with main, push to origin
39+
- name: Rebase v2 on main, push to origin
4240
id: rebaseV2
4341
continue-on-error: true
4442
run: |
43+
git fetch --all
4544
git checkout v2
46-
git fetch
47-
git rebase origin/main
48-
git push origin v2
45+
git rebase -S main
46+
git push --force-with-lease
4947
50-
- name: ⏭ Create pull request from main to v2 when direct rebase fails
48+
- name: ⏭ Create pull request
5149
if: steps.rebaseV2.outcome == 'failure'
5250
uses: thomaseizinger/[email protected]
5351
env:
@@ -56,3 +54,7 @@ jobs:
5654
head: main
5755
base: v2
5856
title: Rebase v2 on main
57+
body: |
58+
This PR is created automatically by the bUnit bot.
59+
60+
When completing this PR, it's important to use **Rebase and merge** to keep the commit history clean.

0 commit comments

Comments
 (0)