diff --git a/.github/workflows/weekly-lints.yml b/.github/workflows/weekly-lints.yml index 949213f269..74c6afc08c 100644 --- a/.github/workflows/weekly-lints.yml +++ b/.github/workflows/weekly-lints.yml @@ -51,14 +51,20 @@ jobs: working-directory: ${{ github.workspace }}/${{ env.CSLIB }} continue-on-error: true run: | + # The default step shell is `bash -e` without `pipefail`, so the status of + # `lake build | tee` would be tee's. Make the pipeline report lake's instead. + set -o pipefail lean_outfile=$(mktemp) - (lake build || true) 2>&1 | tee "${lean_outfile}" + build_status=0 + lake build 2>&1 | tee "${lean_outfile}" || build_status=$? + if [ "${build_status}" -eq 0 ]; then build_success=true; else build_success=false; fi # Process output for posting to Zulip SHA=${{ github.sha }} \ REPO=${{ github.repository }} \ RUN_ID=${{ github.run_id }} \ INFO=true \ + SUCCESS="${build_success}" \ "${CI_SCRIPTS_DIR}/reporting/zulip_build_report.sh" "${lean_outfile}" > "${GITHUB_OUTPUT}" - name: Post output to Zulip