From c5619890fc25412f9a56b3cab0c44e411c7ca8ff Mon Sep 17 00:00:00 2001 From: KazWolfe Date: Mon, 29 Sep 2025 14:54:45 -0700 Subject: [PATCH] different syntax to test add command --- .github/workflows/update-submodules.yml | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/.github/workflows/update-submodules.yml b/.github/workflows/update-submodules.yml index 5dc003b01..af597fc58 100644 --- a/.github/workflows/update-submodules.yml +++ b/.github/workflows/update-submodules.yml @@ -50,13 +50,17 @@ jobs: git reset --hard origin/${{ matrix.submodule.branch }} cd ../.. git add ${{ matrix.submodule.path }} - git commit --message "Update ${{ matrix.submodule.name }}" - if [ $? -eq 0 ]; then - git push origin ${{ matrix.submodule.branch-prefix }}-${{ matrix.branches }} --force - echo "SUBMIT_PR=true" >> "$GITHUB_OUTPUT" - else + + if [[ -z "$(git status --porcelain --untracked-files=no)" ]]; then + echo "No changes detected!" echo "SUBMIT_PR=false" >> "$GITHUB_OUTPUT" + exit 0 fi + + git commit --message "Update ${{ matrix.submodule.name }}" + git push origin ${{ matrix.submodule.branch-prefix }}-${{ matrix.branches }} --force + echo "SUBMIT_PR=true" >> "$GITHUB_OUTPUT" + - name: Create PR if: ${{ steps.update-submodule.outputs.SUBMIT_PR == 'true' }} run: |