Skip to content

Commit 2371c06

Browse files
committed
[skip ci]
1 parent 79404e0 commit 2371c06

File tree

1 file changed

+3
-6
lines changed

1 file changed

+3
-6
lines changed

.github/workflows/update-submodules.yml

+3-6
Original file line numberDiff line numberDiff line change
@@ -33,9 +33,11 @@ jobs:
3333
git fetch --all
3434
git branch -r | grep -v '\->' | grep -v 'origin/HEAD' | sed 's/origin\///' | xargs -n 1 git branch -D || true
3535
36-
- name: Update all submodules
36+
- name: Create or update submodules branch
3737
id: update_submodules
3838
run: |
39+
git fetch origin
40+
git checkout -B update-submodules-branch origin/update-submodules-branch || git checkout -b update-submodules-branch
3941
git submodule update --init --remote
4042
if [ -n "$(git status --porcelain)" ]; then
4143
echo "Submodule updates found"
@@ -45,11 +47,6 @@ jobs:
4547
echo "::set-output name=needs_update::false"
4648
fi
4749
48-
- name: Create a new branch for changes
49-
if: steps.update_submodules.outputs.needs_update == 'true'
50-
run: |
51-
git checkout -b update-submodules-branch
52-
5350
- name: Commit and push changes
5451
if: steps.update_submodules.outputs.needs_update == 'true'
5552
run: |

0 commit comments

Comments
 (0)