Skip to content

Commit de1bdce

Browse files
committed
ci: notify #moab-primary-oncalls on Monday e2e status
Add a workflow_run listener on the scheduled "E2E Tests (Full Suite)" run that fires a Slack webhook-trigger payload with pass/fail status and the @moab-primary-oncalls subteam mention (<!subteam^S0A1Q6WN8JX>). Gated on github.event.workflow_run.event == 'schedule' so manual dispatches and pushes don't page oncall. Reuses SLACK_WEBHOOK_URL; the Slack-side workflow needs a new branch keyed on notification_type to format this payload differently from the issue-opened notification.
1 parent 2f27d6c commit de1bdce

1 file changed

Lines changed: 31 additions & 0 deletions

File tree

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
name: Slack E2E Status Notification
2+
3+
on:
4+
workflow_run:
5+
workflows: ['E2E Tests (Full Suite)']
6+
types: [completed]
7+
8+
permissions:
9+
contents: read
10+
11+
jobs:
12+
notify-slack:
13+
# Only notify on the scheduled Monday run, not manual dispatches or push runs
14+
if: github.event.workflow_run.event == 'schedule'
15+
runs-on: ubuntu-latest
16+
steps:
17+
- name: Send E2E status to Slack
18+
uses: slackapi/slack-github-action@v2.1.1
19+
with:
20+
webhook: ${{ secrets.SLACK_WEBHOOK_URL }}
21+
webhook-type: webhook-trigger
22+
payload: |
23+
notification_type: "e2e_status"
24+
status: "${{ github.event.workflow_run.conclusion }}"
25+
status_emoji: "${{ github.event.workflow_run.conclusion == 'success' && ':white_check_mark:' || ':x:' }}"
26+
status_text: "${{ github.event.workflow_run.conclusion == 'success' && 'PASSED' || 'FAILED' }}"
27+
mention: "<!subteam^S0A1Q6WN8JX>"
28+
run_url: "${{ github.event.workflow_run.html_url }}"
29+
repository: "${{ github.repository }}"
30+
started_at: "${{ github.event.workflow_run.run_started_at }}"
31+
workflow_name: "${{ github.event.workflow_run.name }}"

0 commit comments

Comments
 (0)