diff --git a/.github/workflows/update-submodules.yml b/.github/workflows/update-submodules.yml index 0c2ab0325..45eaceb02 100644 --- a/.github/workflows/update-submodules.yml +++ b/.github/workflows/update-submodules.yml @@ -28,4 +28,7 @@ jobs: git config user.email "63161697+DFHack-Urist@users.noreply.github.com" if bash -x ci/update-submodules.bash; then git push --recurse-submodules=check + elif ! git diff --exit-code HEAD; then + echo "update-submodules.bash failed to commit changes" + exit 1 fi diff --git a/ci/update-submodules.bash b/ci/update-submodules.bash index 312d8f1d3..bebd9fe7d 100755 --- a/ci/update-submodules.bash +++ b/ci/update-submodules.bash @@ -21,6 +21,7 @@ write_msg "" cat ci/update-submodules.manifest | while read path branch; do cd "${git_root}/${path}" test "${git_root}" != "$(get_git_root)" + git fetch origin "${branch}:${branch}" git checkout "${branch}" git pull --ff-only cd "${git_root}"