Skip to content

Commit ed201ff

Browse files
authored
ci: dispatch tag push to Comfy-Org/cloud (Comfy-Org#13541)
Fires on v* tag push (earlier than release.published, which can lag) and triggers a repository_dispatch on Comfy-Org/cloud with event_type comfyui_tag_pushed. Legacy desktop dispatch in release-webhook.yml is left untouched.
1 parent b47f15f commit ed201ff

1 file changed

Lines changed: 45 additions & 0 deletions

File tree

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
name: Tag Dispatch to Cloud
2+
3+
on:
4+
push:
5+
tags:
6+
- 'v*'
7+
8+
jobs:
9+
dispatch-cloud:
10+
runs-on: ubuntu-latest
11+
steps:
12+
- name: Send repository dispatch to cloud
13+
env:
14+
DISPATCH_TOKEN: ${{ secrets.CLOUD_REPO_DISPATCH_TOKEN }}
15+
RELEASE_TAG: ${{ github.ref_name }}
16+
run: |
17+
set -euo pipefail
18+
19+
if [ -z "${DISPATCH_TOKEN:-}" ]; then
20+
echo "::error::CLOUD_REPO_DISPATCH_TOKEN is required but not set."
21+
exit 1
22+
fi
23+
24+
RELEASE_URL="https://github.com/${{ github.repository }}/releases/tag/${RELEASE_TAG}"
25+
26+
PAYLOAD="$(jq -n \
27+
--arg release_tag "$RELEASE_TAG" \
28+
--arg release_url "$RELEASE_URL" \
29+
'{
30+
event_type: "comfyui_tag_pushed",
31+
client_payload: {
32+
release_tag: $release_tag,
33+
release_url: $release_url
34+
}
35+
}')"
36+
37+
curl -fsSL \
38+
-X POST \
39+
-H "Accept: application/vnd.github+json" \
40+
-H "Content-Type: application/json" \
41+
-H "Authorization: Bearer ${DISPATCH_TOKEN}" \
42+
https://api.github.com/repos/Comfy-Org/cloud/dispatches \
43+
-d "$PAYLOAD"
44+
45+
echo "✅ Dispatched ComfyUI tag ${RELEASE_TAG} to Comfy-Org/cloud"

0 commit comments

Comments
 (0)