Skip to content

Commit 79404e0

Browse files
committed
[skip ci]
1 parent 971c60f commit 79404e0

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

.github/workflows/update-submodules.yml

+3-4
Original file line numberDiff line numberDiff line change
@@ -28,11 +28,10 @@ jobs:
2828
- name: Checkout default branch
2929
run: git checkout ${{ steps.default_branch.outputs.branch }}
3030

31-
- name: Delete existing local branch if any
31+
- name: Clean up old branches
3232
run: |
33-
if git show-ref --verify --quiet refs/heads/update-submodules-branch; then
34-
git branch -D update-submodules-branch
35-
fi
33+
git fetch --all
34+
git branch -r | grep -v '\->' | grep -v 'origin/HEAD' | sed 's/origin\///' | xargs -n 1 git branch -D || true
3635
3736
- name: Update all submodules
3837
id: update_submodules

0 commit comments

Comments
 (0)