Skip to content

Commit 4993411

Browse files
benceruleanluluke-mino-altherrCopilotKosinkadink
authored
Dispatch desktop auto-bump when a ComfyUI release is published (Comfy-Org#12398)
* Dispatch desktop auto-bump on ComfyUI release publish * Fix release webhook secret checks in step conditions * Require desktop dispatch token in release webhook * Apply suggestion from @Copilot Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --------- Co-authored-by: Luke Mino-Altherr <lminoaltherr@gmail.com> Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> Co-authored-by: Jedrzej Kosinski <kosinkadink1@gmail.com>
1 parent 2c7cef4 commit 4993411

File tree

1 file changed

+36
-0
lines changed

1 file changed

+36
-0
lines changed

.github/workflows/release-webhook.yml

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@ on:
77
jobs:
88
send-webhook:
99
runs-on: ubuntu-latest
10+
env:
11+
DESKTOP_REPO_DISPATCH_TOKEN: ${{ secrets.DESKTOP_REPO_DISPATCH_TOKEN }}
1012
steps:
1113
- name: Send release webhook
1214
env:
@@ -106,3 +108,37 @@ jobs:
106108
--fail --silent --show-error
107109
108110
echo "✅ Release webhook sent successfully"
111+
112+
- name: Send repository dispatch to desktop
113+
env:
114+
DISPATCH_TOKEN: ${{ env.DESKTOP_REPO_DISPATCH_TOKEN }}
115+
RELEASE_TAG: ${{ github.event.release.tag_name }}
116+
RELEASE_URL: ${{ github.event.release.html_url }}
117+
run: |
118+
set -euo pipefail
119+
120+
if [ -z "${DISPATCH_TOKEN:-}" ]; then
121+
echo "::error::DESKTOP_REPO_DISPATCH_TOKEN is required but not set."
122+
exit 1
123+
fi
124+
125+
PAYLOAD="$(jq -n \
126+
--arg release_tag "$RELEASE_TAG" \
127+
--arg release_url "$RELEASE_URL" \
128+
'{
129+
event_type: "comfyui_release_published",
130+
client_payload: {
131+
release_tag: $release_tag,
132+
release_url: $release_url
133+
}
134+
}')"
135+
136+
curl -fsSL \
137+
-X POST \
138+
-H "Accept: application/vnd.github+json" \
139+
-H "Content-Type: application/json" \
140+
-H "Authorization: Bearer ${DISPATCH_TOKEN}" \
141+
https://api.github.com/repos/Comfy-Org/desktop/dispatches \
142+
-d "$PAYLOAD"
143+
144+
echo "✅ Dispatched ComfyUI release ${RELEASE_TAG} to Comfy-Org/desktop"

0 commit comments

Comments
 (0)