Skip to content

Commit c96c143

Browse files
mertekrenkartben
authored andcommitted
ci: workflows: remove rebase-merge folder before rebase
With gitv2.26, git rebase uses "git merge" mechanism instead of "git apply". This creates a rebase-merge folder in .git, in case of rebase conflict. This caused problems in self hosted runners due to old rebase-merge folder. This commit deletes this folder before git rebase action. Signed-off-by: Mert Ekren <[email protected]>
1 parent 3b56358 commit c96c143

File tree

9 files changed

+14
-0
lines changed

9 files changed

+14
-0
lines changed

.github/workflows/bsim-tests.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,7 @@ jobs:
7777
git config --global user.email "[email protected]"
7878
git config --global user.name "Zephyr Bot"
7979
rm -fr ".git/rebase-apply"
80+
rm -fr ".git/rebase-merge"
8081
git rebase origin/${BASE_REF}
8182
git clean -f -d
8283
git log --pretty=oneline | head -n 10

.github/workflows/clang.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,7 @@ jobs:
6161
git config --global user.email "[email protected]"
6262
git config --global user.name "Zephyr Bot"
6363
rm -fr ".git/rebase-apply"
64+
rm -fr ".git/rebase-merge"
6465
git rebase origin/${BASE_REF}
6566
git clean -f -d
6667
git log --pretty=oneline | head -n 10

.github/workflows/coding_guidelines.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,8 @@ jobs:
4040
git config --global user.email "[email protected]"
4141
git config --global user.name "Github Actions"
4242
git remote -v
43+
rm -fr ".git/rebase-apply"
44+
rm -fr ".git/rebase-merge"
4345
git rebase origin/${BASE_REF}
4446
git clean -f -d
4547
source zephyr-env.sh

.github/workflows/compliance.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,8 @@ jobs:
3333
# Ensure there's no merge commits in the PR
3434
[[ "$(git rev-list --merges --count origin/${BASE_REF}..)" == "0" ]] || \
3535
(echo "::error ::Merge commits not allowed, rebase instead";false)
36+
rm -fr ".git/rebase-apply"
37+
rm -fr ".git/rebase-merge"
3638
git rebase origin/${BASE_REF}
3739
git clean -f -d
3840
# debug

.github/workflows/doc-build.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,8 @@ jobs:
9494
run: |
9595
git config --global user.email "[email protected]"
9696
git config --global user.name "Github Actions"
97+
rm -fr ".git/rebase-apply"
98+
rm -fr ".git/rebase-merge"
9799
git rebase origin/${BASE_REF}
98100
git clean -f -d
99101
git log --graph --oneline HEAD...${PR_HEAD}

.github/workflows/hello_world_multiplatform.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,8 @@ jobs:
4545
run: |
4646
git config --global user.email "[email protected]"
4747
git config --global user.name "Github Actions"
48+
rm -fr ".git/rebase-apply"
49+
rm -fr ".git/rebase-merge"
4850
git rebase origin/${BASE_REF}
4951
git clean -f -d
5052
git log --graph --oneline HEAD...${PR_HEAD}

.github/workflows/scripts_tests.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,8 @@ jobs:
4242
run: |
4343
git config --global user.email "[email protected]"
4444
git config --global user.name "Github Actions"
45+
rm -fr ".git/rebase-apply"
46+
rm -fr ".git/rebase-merge"
4547
git rebase origin/${BASE_REF}
4648
git clean -f -d
4749
git log --graph --oneline HEAD...${PR_HEAD}

.github/workflows/twister-prep.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,7 @@ jobs:
6767
git config --global user.email "[email protected]"
6868
git config --global user.name "Zephyr Bot"
6969
rm -fr ".git/rebase-apply"
70+
rm -fr ".git/rebase-merge"
7071
git rebase origin/${BASE_REF}
7172
git clean -f -d
7273
git log --pretty=oneline | head -n 10

.github/workflows/twister.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,7 @@ jobs:
8484
git config --global user.email "[email protected]"
8585
git config --global user.name "Zephyr Builder"
8686
rm -fr ".git/rebase-apply"
87+
rm -fr ".git/rebase-merge"
8788
git rebase origin/${BASE_REF}
8889
git clean -f -d
8990
git log --pretty=oneline | head -n 10

0 commit comments

Comments
 (0)