Skip to content

ci: ping Slack on deploys - #268

Merged
zanjonke merged 1 commit into
mainfrom
slack-deploy-notifications
Jul 31, 2026
Merged

ci: ping Slack on deploys#268
zanjonke merged 1 commit into
mainfrom
slack-deploy-notifications

Conversation

@zanjonke

Copy link
Copy Markdown
Contributor

What

Adds Slack webhook pings when a deploy happens, mirroring the pattern already used in codeplain-api (plain curl to $SLACK_WEBHOOK_URL, start / success / failure messages, prefixed with the repo name).

This repo has two deploy paths, both now covered:

publish-to-pypi.yml (release published)

  • start — release tag published by whom, building
  • build failure — nothing reached PyPI
  • publish success — with the pip install --upgrade codeplain hint
  • publish failure — links the run log

publish-install-script.yml (push to main touching install/)

  • success / failure of the R2 upload; the failure message calls out that users may be served a stale installer

Notes

  • Every ping is guarded on env.SLACK_WEBHOOK_URL != '', so forks and any repo without the secret are unaffected — no failing steps.
  • Reuses the existing SLACK_WEBHOOK_URL secret already consumed by nofity-slack-on-main-merge.yml. No new secrets needed.
  • Notifications are appended as steps rather than a separate job, so they inherit each job's context and don't need extra permissions.

Mirrors the deploy notifications in codeplain-api: post to the
SLACK_WEBHOOK_URL on deploy start, success and failure so releases are
visible without watching the Actions tab.

Covers both deploy paths in this repo:
- PyPI release publish (start / build failure / publish success / failure)
- install script upload to R2 (success / failure)

Each ping is guarded on the webhook being configured, so forks and
repos without the secret are unaffected.

@hisenb3rg hisenb3rg left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 👍

@zanjonke
zanjonke merged commit 20422a6 into main Jul 31, 2026
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants