mirror of
https://github.com/Azornes/Comfyui-LayerForge.git
synced 2026-03-25 14:25:44 -03:00
Refactor publish workflow to composite action
Converted the publish workflow from a job-based GitHub Actions workflow to a reusable composite action. Added inputs for personal access token and skip_checkout, included Python setup and comfy-cli installation steps, and updated the publish command to use the new structure.
This commit is contained in:
57
.github/workflows/publish.yml
vendored
57
.github/workflows/publish.yml
vendored
@@ -1,28 +1,29 @@
|
|||||||
name: Publish to Comfy registry
|
name: "Publish To Registry"
|
||||||
on:
|
description: "Publish Custom Nodes to Registry."
|
||||||
workflow_dispatch:
|
inputs:
|
||||||
push:
|
personal_access_token:
|
||||||
branches:
|
description: "Personal Access Token for authenticating to the Registry"
|
||||||
- main
|
required: true
|
||||||
- master
|
skip_checkout:
|
||||||
paths:
|
description: "Whether to skip the checkout step (true/false)"
|
||||||
- "pyproject.toml"
|
required: false
|
||||||
|
default: 'false'
|
||||||
permissions:
|
runs:
|
||||||
issues: write
|
using: "composite"
|
||||||
|
steps:
|
||||||
jobs:
|
- name: Checkout Custom Node Repository
|
||||||
publish-node:
|
uses: actions/checkout@v4
|
||||||
name: Publish Custom Node to registry
|
if: ${{ inputs.skip_checkout != 'true' }}
|
||||||
runs-on: ubuntu-latest
|
- name: Set up Python
|
||||||
if: ${{ github.repository_owner == 'Azornes' }}
|
uses: actions/setup-python@v5
|
||||||
steps:
|
with:
|
||||||
- name: Check out code
|
python-version: '3.10'
|
||||||
uses: actions/checkout@v4
|
- name: Install comfy-cli
|
||||||
with:
|
shell: bash
|
||||||
submodules: true
|
run: |
|
||||||
- name: Publish Custom Node
|
pip install comfy-cli
|
||||||
uses: Comfy-Org/publish-node-action@v1
|
- name: Publish Node
|
||||||
with:
|
shell: bash
|
||||||
## Add your own personal access token to your Github Repository secrets and reference it here.
|
run: |
|
||||||
personal_access_token: ${{ secrets.REGISTRY_ACCESS_TOKEN }}
|
comfy --skip-prompt --no-enable-telemetry env
|
||||||
|
comfy node publish --token ${{ secrets.REGISTRY_ACCESS_TOKEN }}
|
||||||
Reference in New Issue
Block a user