Conversation
…lback (#6) The previous notify.yaml POSTed straight to DISCORD_WEBHOOK_URL, which fails 401 when the URL points at a cf-discord-relay deployment (the relay requires an x-auth-key header). Adopts the pattern from cf-discord-relay's own notify.yaml: - DISCORD_WEBHOOK_URL stays the DIRECT Discord webhook URL, no relay- specific form. The relay URL is synthesized at runtime by stripping the Discord host + /api/ prefix and prepending the relay domain. - New optional secrets DISCORD_RELAY_AUTH_KEY + DISCORD_RELAY_CUSTOM_DOMAIN. When both are set, the embed is posted via the relay first. If the relay returns non-2xx, the workflow falls back to the direct Discord webhook so a relay outage does not lose the notification. - Names carry the DISCORD_RELAY_ prefix since this repo is external to cf-discord-relay and the secrets need context to be self-documenting. Also tightens the embed building: - truncate_str helper applies Discord's per-element character limits (title 256, description 4096, field value 1024) so a long release body cannot cause Discord to reject the payload. - Inputs flow through env: instead of direct ${{ }} interpolation so a crafted tag string cannot inject into the run script. - set -euo pipefail + --fail-with-body so failures surface in the Actions UI instead of silently going missing. Signed-off-by: Synertry <60792595+Synertry@users.noreply.github.com>
|
You are seeing this message because GitHub Code Scanning has recently been set up for this repository, or this pull request contains the workflow file for the Code Scanning tool. What Enabling Code Scanning Means:
For more information about GitHub Code Scanning, check out the documentation. |
Release Candidate SummaryAutomation report for review before merging into release. Statistics
Changed FilesClick to expand file listM .github/workflows/notify.yamlCommit HistoryClick to expand commit log
Generated by GitHub Actions for Release Verification |
Owner
Author
|
/approve |
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.
The previous notify.yaml POSTed straight to DISCORD_WEBHOOK_URL, which
fails 401 when the URL points at a cf-discord-relay deployment (the
relay requires an x-auth-key header). Adopts the pattern from
cf-discord-relay's own notify.yaml:
specific form. The relay URL is synthesized at runtime by stripping
the Discord host + /api/ prefix and prepending the relay domain.
When both are set, the embed is posted via the relay first. If the
relay returns non-2xx, the workflow falls back to the direct Discord
webhook so a relay outage does not lose the notification.
cf-discord-relay and the secrets need context to be self-documenting.
Also tightens the embed building:
(title 256, description 4096, field value 1024) so a long release
body cannot cause Discord to reject the payload.
crafted tag string cannot inject into the run script.
UI instead of silently going missing.
Signed-off-by: Synertry 60792595+Synertry@users.noreply.github.com