mirror of
https://github.com/block/goose.git
synced 2026-07-17 12:56:20 +02:00
36 lines
1.1 KiB
YAML
36 lines
1.1 KiB
YAML
name: BuildNotify
|
|
|
|
on:
|
|
workflow_run:
|
|
workflows:
|
|
- CI
|
|
- Release
|
|
- Canary
|
|
types: [completed]
|
|
|
|
|
|
jobs:
|
|
notify:
|
|
if: >
|
|
github.event.workflow_run.conclusion == 'failure' &&
|
|
(
|
|
github.event.workflow_run.name != 'CI' ||
|
|
github.event.workflow_run.head_branch == 'main' ||
|
|
github.event.workflow_run.event == 'merge_group'
|
|
)
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Notify Discord
|
|
env:
|
|
DISCORD_WEBHOOK_URL: ${{ secrets.DISCORD_WEBHOOK_GOOSE_STATUS }}
|
|
run: |
|
|
curl -sS --fail-with-body -H "Content-Type: application/json" \
|
|
-d '{
|
|
"embeds": [{
|
|
"title": "❌ Build Failed",
|
|
"description": "**Workflow:** ${{ github.event.workflow_run.name }}\n**Branch:** ${{ github.event.workflow_run.head_branch }}\n**Commit:** ${{ github.event.workflow_run.head_sha }}",
|
|
"url": "${{ github.event.workflow_run.html_url }}",
|
|
"color": 15158332
|
|
}]
|
|
}' \
|
|
"$DISCORD_WEBHOOK_URL" |