Skip to content

Commit cf11db1

Browse files
committed
add check for changes
1 parent c727969 commit cf11db1

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

.github/workflows/update-submodules.yml

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,25 @@ jobs:
2727
run: |
2828
git submodule update --init --recursive
2929
30+
31+
- name: Check for Changes
32+
id: check_changes
33+
run: |
34+
if git diff --quiet; then
35+
echo "no_changes=false" >> "$GITHUB_OUTPUT"
36+
else
37+
echo "no_changes=true" >> "$GITHUB_OUTPUT"
38+
fi
39+
40+
- name: Create Branch
41+
if: steps.check_changes.outputs.no_changes == 'false'
42+
run: |
43+
git checkout -b submodules-update
44+
git add .
45+
git commit -m "chore: update Submodules"
46+
3047
- name: Create Pull Request
48+
if: steps.check_changes.outputs.no_changes == 'false'
3149
uses: peter-evans/create-pull-request@271a8d0340265f705b14b6d32b9829c1cb33d45e # v7.0.8
3250
with:
3351
base: main

0 commit comments

Comments
 (0)