chore: notify Chloé on release build failure

This commit is contained in:
sdkman-chloe[bot]
2026-03-02 11:31:52 +00:00
committed by Marco Vermeulen
parent f6524ce2a6
commit d734ef2a68

View File

@@ -47,3 +47,24 @@ jobs:
run: bin/release-binary.sh "$MONGO_URL" "$MONGO_USERNAME" "$MONGO_PASSWORD" "$RELEASE_TAG" "stable"
- name: Tweet about it
run: ./gradlew -Penv=stable -Prelease=${{ github.event.inputs.version }} jreleaserAnnounce
notify-failure:
name: "Notify on Failure"
runs-on: ubuntu-latest
needs: [build]
if: failure()
steps:
- name: Notify Chloé
env:
REPO: ${{ github.repository }}
RUN_URL: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}
run: |
MSG="❌ Release build failed: ${REPO}"
MSG+=$'\nRun: '"${RUN_URL}"
PAYLOAD=$(jq -n --arg msg "$MSG" --arg name "GitHub CI" \
'{message: $msg, name: $name, deliver: true, channel: "discord", to: "user:918237603617206303"}')
curl -sf -X POST \
-H "Authorization: Bearer ${{ secrets.OPENCLAW_HOOK_TOKEN }}" \
-H "Content-Type: application/json" \
-d "$PAYLOAD" \
"${{ secrets.OPENCLAW_HOOK_URL }}"