33 lines
1.0 KiB
YAML
33 lines
1.0 KiB
YAML
name: Publish to Comfy registry
|
|
on:
|
|
workflow_dispatch:
|
|
push:
|
|
branches:
|
|
- main
|
|
paths:
|
|
- "pyproject.toml"
|
|
# only run when tags are pushed
|
|
# tags:
|
|
# - '*'
|
|
|
|
jobs:
|
|
publish-node:
|
|
name: Publish Custom Node to registry
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Check out code
|
|
uses: actions/checkout@v4
|
|
- name: Check if Node Exists in Registry
|
|
run: |
|
|
curl -s -X GET "https://registry.comfy.org/nodes/ymc-node-suite-comfyui" -H "Authorization: Bearer ${{ secrets.COMFY_REGISTRY_TOKEN }}" \
|
|
| jq '.claimed_by // empty' > claimed_status.txt
|
|
if [ -s claimed_status.txt ]; then
|
|
echo "Node already exists and is claimed. Skipping publish step."
|
|
exit 0
|
|
fi
|
|
- name: Publish Custom Node
|
|
uses: Comfy-Org/publish-node-action@main
|
|
with:
|
|
## Add your own personal access token to your Github Repository secrets and reference it here.
|
|
personal_access_token: ${{ secrets.COMFY_REGISTRY_TOKEN }}
|