diff --git a/.github/workflows/update-submodule.yml b/.github/workflows/update-submodule.yml index 943c6a7167b..05393b03d65 100644 --- a/.github/workflows/update-submodule.yml +++ b/.github/workflows/update-submodule.yml @@ -1,4 +1,4 @@ -name: Update Submodules +name: (U) 🧰 Update Submodules on: workflow_dispatch: @@ -14,9 +14,20 @@ jobs: with: submodules: "recursive" + - name: configure git + run: | + git config --global user.name "github-actions[bot]" + git config --global user.email "41898282+github-actions[bot]@users.noreply.github.com" + - name: Update Submodules run: | - git submodule update --init --recursive + git submodule update --remote git add . - git commit -m "[FB bot] Submodule | Update Submodules" + + if git diff-index --quiet HEAD --; then + echo "No submodule changes; exiting." + exit 0 + fi + + git commit -m "[FB bot] Update submodules" -a git push