mirror of
https://git.datalinker.icu/comfyanonymous/ComfyUI
synced 2026-09-13 07:47:06 +08:00
54 lines
1.3 KiB
YAML
54 lines
1.3 KiB
YAML
# See: https://github.com/cubeofcube-dev/docker-library
|
|
|
|
name: Build and push `comfyui` docker image
|
|
|
|
on:
|
|
workflow_dispatch:
|
|
push:
|
|
branches:
|
|
- main
|
|
paths:
|
|
- ./**
|
|
- .github/workflows/comfyui.yml
|
|
pull_request:
|
|
branches:
|
|
- main
|
|
paths:
|
|
- ./**
|
|
|
|
jobs:
|
|
build-and-push:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
with:
|
|
submodules: true
|
|
|
|
- name: Set up qemu
|
|
uses: docker/setup-qemu-action@v3
|
|
|
|
- name: Set up docker buildx
|
|
uses: docker/setup-buildx-action@v3
|
|
|
|
- name: Login to docker hub
|
|
uses: docker/login-action@v3
|
|
with:
|
|
username: ${{ secrets.DOCKER_USERNAME }}
|
|
password: ${{ secrets.DOCKER_PASSWORD }}
|
|
|
|
- name: Get current date
|
|
id: date
|
|
run: echo "DATE=$(date +'%Y%m%d')" >> $GITHUB_ENV
|
|
|
|
- name: Build and push docker image
|
|
uses: docker/build-push-action@v6
|
|
with:
|
|
file: ./Dockerfile
|
|
platforms: linux/amd64
|
|
context: .
|
|
push: ${{ github.ref == 'refs/heads/main' }}
|
|
tags: |
|
|
${{ secrets.DOCKER_USERNAME }}/comfyui:${{ github.sha }}
|
|
${{ secrets.DOCKER_USERNAME }}/comfyui:${{ env.DATE }}
|
|
${{ secrets.DOCKER_USERNAME }}/comfyui:latest
|