fix: map scraper-api service name to correct submodule path
The update-submodule.yml workflow used apps/${SERVICE} directly,
but the submodule path is apps/scraper, not apps/scraper-api.
Added a case statement to map service names to correct paths.
This commit is contained in:
@@ -52,14 +52,19 @@ jobs:
|
|||||||
run: |
|
run: |
|
||||||
set -euo pipefail
|
set -euo pipefail
|
||||||
|
|
||||||
echo "Updating ${SERVICE} to ${SHA}"
|
# Map service name to submodule path
|
||||||
git submodule update --init "apps/${SERVICE}"
|
case "$SERVICE" in
|
||||||
cd "apps/${SERVICE}"
|
scraper-api) SUBMODULE_PATH="apps/scraper" ;;
|
||||||
# full fetch so we get tree objects for the target SHA
|
*) SUBMODULE_PATH="apps/${SERVICE}" ;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
echo "Updating ${SUBMODULE_PATH} to ${SHA}"
|
||||||
|
git submodule update --init "${SUBMODULE_PATH}"
|
||||||
|
cd "${SUBMODULE_PATH}"
|
||||||
git fetch --depth=1 origin master 2>/dev/null || git fetch --depth=1 origin main
|
git fetch --depth=1 origin master 2>/dev/null || git fetch --depth=1 origin main
|
||||||
git checkout "${SHA}"
|
git checkout "${SHA}"
|
||||||
cd "${GITHUB_WORKSPACE}"
|
cd "${GITHUB_WORKSPACE}"
|
||||||
git add "apps/${SERVICE}"
|
git add "${SUBMODULE_PATH}"
|
||||||
git diff --cached --quiet && exit 0
|
git diff --cached --quiet && exit 0
|
||||||
|
|
||||||
git config user.name "monrepo-bot"
|
git config user.name "monrepo-bot"
|
||||||
|
|||||||
Reference in New Issue
Block a user