diff --git a/.github/workflows/ministry-bot.yml b/.github/workflows/ministry-bot.yml index d8714af..2c8c277 100644 --- a/.github/workflows/ministry-bot.yml +++ b/.github/workflows/ministry-bot.yml @@ -22,6 +22,14 @@ jobs: - name: Run Ministry Router run: | - node Ministry/Integration/index.mjs \ + ROUTER_PATH="$(find . -type f -path '*/Integration/router.mjs' | head -n 1)" + + if [ -z "$ROUTER_PATH" ]; then + echo "Unable to find Integration/router.mjs in the checked-out repository." >&2 + echo "Either commit the Ministry bot sources to this repository, adjust the workflow to the correct path, or add a fetch step before running the router." >&2 + exit 1 + fi + + node "$ROUTER_PATH" \ --event "$GITHUB_EVENT_NAME" \ --payload "$GITHUB_EVENT_PATH" \ No newline at end of file