ComfyUI/ComfyUI-master/.github/workflows/ci-cd.yml
Bahadir Ciloglu 68f8909470 Simplify GitHub Actions workflow - single fast pipeline
- Removed complex multi-job workflow
- Quick validation only (syntax + file checks)
- Direct RunPod build trigger
- Much faster execution
- Single workflow file
2025-11-01 15:51:41 +03:00

63 lines
1.7 KiB
YAML
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

name: ComfyUI Build & Deploy
on:
push:
branches: [ create_image ]
pull_request:
branches: [ create_image ]
workflow_dispatch:
env:
REGISTRY: ghcr.io
IMAGE_NAME: ${{ github.repository }}
jobs:
# Quick validation and build
build-and-deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Quick validation
run: |
# Python syntax check
python3 -m py_compile runpod_handler.py
echo "✅ Python syntax OK"
# Dockerfile check
if [ ! -f Dockerfile ]; then
echo "❌ Dockerfile missing"
exit 1
fi
echo "✅ Dockerfile exists"
# Environment template check
if [ ! -f .env.example ]; then
echo "❌ .env.example missing"
exit 1
fi
echo "✅ Environment template OK"
- name: Trigger RunPod Build
if: github.ref == 'refs/heads/create_image' && github.event_name == 'push'
run: |
echo "🚀 Triggering RunPod build..."
# Simple RunPod API call
curl -X POST \
-H "Authorization: Bearer ${{ secrets.RUNPOD_API_KEY }}" \
-H "Content-Type: application/json" \
https://api.runpod.ai/v2/${{ secrets.RUNPOD_ENDPOINT_ID }}/rebuild || echo "⚠️ Manual rebuild required"
echo "✅ RunPod build triggered"
- name: Summary
run: |
echo "🎉 Pipeline completed!"
if [ "${{ github.ref }}" = "refs/heads/create_image" ] && [ "${{ github.event_name }}" = "push" ]; then
echo "✅ RunPod build triggered"
else
echo " RunPod build skipped (not main branch push)"
fi