From 68525d5ae4de3c9a7a5a38d36c0af9a7b8dc7311 Mon Sep 17 00:00:00 2001 From: Ismo Vuorinen Date: Fri, 21 Feb 2025 16:25:27 +0200 Subject: [PATCH] Update update-submodules.yml --- .github/workflows/update-submodules.yml | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) diff --git a/.github/workflows/update-submodules.yml b/.github/workflows/update-submodules.yml index f5ac930..6c77125 100644 --- a/.github/workflows/update-submodules.yml +++ b/.github/workflows/update-submodules.yml @@ -25,15 +25,20 @@ jobs: git config --global user.email "${{ github.actor }}@users.noreply.github.com" - name: Update submodules run: | - if git commit -am"chore(git): Update submodules (automated) - - $(git submodule --quiet foreach \ - 'tag="$(git describe --tags --abbrev=0 origin/HEAD)" + git submodule sync + git submodule foreach --quiet ' + tag="$(git describe --tags --abbrev=0 origin/HEAD)" if [ "$(git describe --tags)" != "$tag" ]; then git checkout --quiet "$tag" - echo "$name" "$tag" - fi')" - then + echo "$name updated to $tag" + fi + ' + + if git diff --quiet; then + echo "No updates for submodules." + else + git add . + git commit -m "chore(git): Update submodules (automated)" git show --raw git push fi