diff --git a/.ci/premerge_advisor_explain.py b/.ci/premerge_advisor_explain.py index 6296599aa4f49..a88bfd223d9aa 100644 --- a/.ci/premerge_advisor_explain.py +++ b/.ci/premerge_advisor_explain.py @@ -158,3 +158,5 @@ def main( args.pr_number, args.return_code, ) + + sys.exit(args.return_code) diff --git a/.ci/utils.sh b/.ci/utils.sh index 713a07ba5d898..923c64a4e169c 100644 --- a/.ci/utils.sh +++ b/.ci/utils.sh @@ -37,10 +37,11 @@ function at-exit { python "${MONOREPO_ROOT}"/.ci/generate_test_report_github.py \ $retcode "${BUILD_DIR}"/test-results.*.xml "${MONOREPO_ROOT}"/ninja*.log \ >> $GITHUB_STEP_SUMMARY - python "${MONOREPO_ROOT}"/.ci/premerge_advisor_explain.py \ + (python "${MONOREPO_ROOT}"/.ci/premerge_advisor_explain.py \ $(git rev-parse HEAD~1) $retcode "${GITHUB_TOKEN}" \ $GITHUB_PR_NUMBER "${BUILD_DIR}"/test-results.*.xml \ - "${MONOREPO_ROOT}"/ninja*.log + "${MONOREPO_ROOT}"/ninja*.log) + advisor_retcode=$? fi if [[ "$retcode" != "0" ]]; then @@ -54,6 +55,10 @@ function at-exit { "${BUILD_DIR}"/test-results.*.xml "${MONOREPO_ROOT}"/ninja*.log fi fi + + if [[ -n "$GITHUB_ACTIONS" ]]; then + exit $advisor_retcode + fi } trap at-exit EXIT