Skip to content
This repository was archived by the owner on May 20, 2026. It is now read-only.
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 29 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -128,3 +128,32 @@ jobs:
make clean
make build
make check-build

notify-failure:
Comment thread
mjohnsonsu marked this conversation as resolved.
needs: [typescript-build, modelcontextprotocol-build, python-build]
permissions: {}
if: ${{ failure() && github.event_name != 'pull_request' }}
runs-on: ubuntu-latest
steps:
- name: Notify Slack
env:
SLACK_CI_WEBHOOK_URL: ${{ secrets.SLACK_CI_WEBHOOK_URL }}
run: |
if [[ -z "${SLACK_CI_WEBHOOK_URL:-}" ]]; then
echo "SLACK_CI_WEBHOOK_URL not set; skipping notify"
exit 0
fi
short_sha="${GITHUB_SHA:0:7}"
run_url="${GITHUB_SERVER_URL}/${GITHUB_REPOSITORY}/actions/runs/${GITHUB_RUN_ID}"
commit_url="${GITHUB_SERVER_URL}/${GITHUB_REPOSITORY}/commit/${GITHUB_SHA}"
jq -n \
--arg repo "$GITHUB_REPOSITORY" \
--arg workflow "$GITHUB_WORKFLOW" \
--arg branch "$GITHUB_REF_NAME" \
--arg actor "$GITHUB_ACTOR" \
--arg short_sha "$short_sha" \
--arg commit_url "$commit_url" \
--arg run_url "$run_url" \
'{text: (":rotating_light: *" + $repo + "* — workflow `" + $workflow + "` failed on `" + $branch + "`\nCommit: <" + $commit_url + "|`" + $short_sha + "`> by " + $actor + "\nRun: <" + $run_url + "|view logs>")}' \
| curl -sS -X POST -H 'Content-Type: application/json' --data @- "$SLACK_CI_WEBHOOK_URL" >/dev/null \
|| echo "WARNING: Slack post failed" >&2
Loading