Skip to content

ci: send Slack notifications through the shared notify-slack action - #60

Merged
jsenko merged 3 commits into
Apitomy:mainfrom
jsenko:slack-notify-action
Oct 14, 2026
Merged

jsenko merged 3 commits into
Apitomy:mainfrom
jsenko:slack-notify-action

Conversation

@jsenko

@jsenko jsenko commented Oct 14, 2026 •

Copy link
Copy Markdown
Contributor

Part of Apicurio/apicurio-registry#10380.

Summary

The workflows here post to Slack with inline curl steps and the SLACK_NOTIFICATION_WEBHOOK and SLACK_ERROR_WEBHOOK secrets: every run goes to one channel, and failures go to the other as well. Those secrets are being retired. This PR moves the workflows to the shared notify-slack action (v2.4.0), which routes a message by whether anyone has to act on it:

  • important: the team channel. The message mentions whoever ran the workflow, the first of them with a SLACK_USER_MAP entry.
  • general: the notification channel, with no mention.
Workflow Important when General when
verify.yaml — a failed push to main (one message per run, from a new notify job)
npm-publish.yaml it fails when run on its own it succeeds when run on its own. When release.yaml calls it, it posts nothing (new input quiet), and the release reports it
release.yaml any of its jobs (release, npm-publish, finalize) fails or times out; the message lists each job's result. A failed release job used to post nothing the release succeeds: one message for the release and its publishes
update-website.yaml it fails — (the release's own message covers the success)

A run cancelled by hand posts nothing. Runs started by apitomy-ci (update-website.yaml, triggered by the release that account creates) mention nobody, through machine-users: apitomy-ci.

The three organization secrets the action needs (SLACK_IMPORTANT_NOTIFICATION_WEBHOOK, SLACK_GENERAL_NOTIFICATION_WEBHOOK, SLACK_USER_MAP) already reach this repository.

Testing

  • actionlint v1.7.12 reports nothing for the changed workflows.
  • Apicurio Registry uses the same action for its release and post-merge notifications.
  • The release and publish paths only run during a release, so the first release after this PR is their end-to-end test.

The workflows posted to Slack with inline curl steps and the
SLACK_NOTIFICATION_WEBHOOK / SLACK_ERROR_WEBHOOK secrets, which are being
retired (Apicurio/apicurio-registry#10380). They now use
Apicurio/apicurio-github-actions/notify-slack, routed by whether anyone
has to act:

- Verify: a failed push goes to the general channel; success says
  nothing.
- Publish, release and website: success to the general channel, failure
  to the important one, mentioning whoever ran the workflow.

A release reports its publishes in one message, so the publishes it
calls are quiet; run on their own, they report themselves.

Signed-off-by: Jakub Senko <m@jsenko.net>

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🟢 Approval recommended

The workflows consistently implement the described routing, suppression, and cancellation behavior with no unresolved issues.

0 open findings

What changed in this PR

Migrates Slack notifications from inline webhooks to the shared, pinned notify-slack action with actionability-based routing.

Changes:

  • Routes successful releases to general and failures to important notifications.
  • Suppresses duplicate npm notifications when called by the release workflow.
  • Avoids notifications for cancelled runs and machine users.
File Description
.github/​workflows/​verify.yaml Adds failed-push notifications.
.github/​workflows/​update-website.yaml Routes website update outcomes.
.github/​workflows/​release.yaml Reports the combined release outcome.
.github/​workflows/​npm-publish.yaml Adds standalone notifications and quiet mode.

🧠 Review effort: Balanced


💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

The release already posts one success message for the whole release;
a second for the website it triggers told nobody anything new.

Signed-off-by: Jakub Senko <m@jsenko.net>
failure() stays true when a run that already failed is cancelled, so the
notify job could still post.

Signed-off-by: Jakub Senko <m@jsenko.net>
@jsenko
jsenko merged commit 63adb97 into Apitomy:main Oct 14, 2026
2 checks passed
@jsenko
jsenko deleted the slack-notify-action branch October 14, 2026 17:27
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