Skip to content

Commit 2e3e4b2

Browse files
committed
ci(showcase): notify #team-showcase on successful prod promotion
Add a success-only Slack post to #team-showcase in the showcase_promote notify job, mirroring the existing failure→#oss-alerts step. Guarded by env.SLACK_WEBHOOK_TS so it safely no-ops until the SLACK_WEBHOOK_TEAM_SHOWCASE org secret exists. Failures continue to route only to #oss-alerts.
1 parent 14bfd3b commit 2e3e4b2

1 file changed

Lines changed: 19 additions & 0 deletions

File tree

.github/workflows/showcase_promote.yml

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ name: "Showcase: Promote (staging → prod)"
1717
# target service(s). Feature-level probes,
1818
# not naked 200.
1919
# 4. notify → Slack #oss-alerts on any red. Never #engr.
20+
# success → #team-showcase.
2021

2122
on:
2223
workflow_dispatch:
@@ -314,6 +315,7 @@ jobs:
314315
actions: read
315316
env:
316317
SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK_OSS_ALERTS }}
318+
SLACK_WEBHOOK_TS: ${{ secrets.SLACK_WEBHOOK_TEAM_SHOWCASE }}
317319
steps:
318320
# Best-effort promote invariant (do NOT reintroduce a PRE gate below):
319321
# resolve-targets = HARD precondition (must succeed).
@@ -387,6 +389,23 @@ jobs:
387389
github.run_id
388390
)) }}
389391
}
392+
- name: Post to #team-showcase
393+
if: steps.state.outputs.state == 'success' && inputs.service != '__select_a_service__' && env.SLACK_WEBHOOK_TS != ''
394+
uses: slackapi/slack-github-action@b0fa283ad8fea605de13dc3f449259339835fc52 # v2.1.0
395+
with:
396+
webhook: ${{ secrets.SLACK_WEBHOOK_TEAM_SHOWCASE }}
397+
webhook-type: incoming-webhook
398+
payload: |
399+
{
400+
"text": ${{ toJSON(format(
401+
'{0} *Showcase Promoted to Prod*\nServices: `{1}`\n<{2}/{3}/actions/runs/{4}|View run>',
402+
steps.state.outputs.icon,
403+
steps.state.outputs.csv,
404+
github.server_url,
405+
github.repository,
406+
github.run_id
407+
)) }}
408+
}
390409
- name: Log (no Slack — webhook unset)
391410
if: steps.state.outputs.state == 'failure' && inputs.service != '__select_a_service__' && env.SLACK_WEBHOOK == ''
392411
env:

0 commit comments

Comments
 (0)