We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 971c60f commit 79404e0Copy full SHA for 79404e0
.github/workflows/update-submodules.yml
@@ -28,11 +28,10 @@ jobs:
28
- name: Checkout default branch
29
run: git checkout ${{ steps.default_branch.outputs.branch }}
30
31
- - name: Delete existing local branch if any
+ - name: Clean up old branches
32
run: |
33
- if git show-ref --verify --quiet refs/heads/update-submodules-branch; then
34
- git branch -D update-submodules-branch
35
- fi
+ git fetch --all
+ git branch -r | grep -v '\->' | grep -v 'origin/HEAD' | sed 's/origin\///' | xargs -n 1 git branch -D || true
36
37
- name: Update all submodules
38
id: update_submodules
0 commit comments