Repository navigation
ci: send Slack notifications through the shared notify-slack action - #60
Merged
Merged
Conversation
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>
There was a problem hiding this comment.
🟢 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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Part of Apicurio/apicurio-registry#10380.
Summary
The workflows here post to Slack with inline
curlsteps and theSLACK_NOTIFICATION_WEBHOOKandSLACK_ERROR_WEBHOOKsecrets: 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 sharednotify-slackaction (v2.4.0), which routes a message by whether anyone has to act on it:SLACK_USER_MAPentry.verify.yamlmain(one message per run, from a newnotifyjob)npm-publish.yamlrelease.yamlcalls it, it posts nothing (new inputquiet), and the release reports itrelease.yamlreleasejob used to post nothingupdate-website.yamlA run cancelled by hand posts nothing. Runs started by
apitomy-ci(update-website.yaml, triggered by the release that account creates) mention nobody, throughmachine-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