Skip to content

add CPU env variable #23

add CPU env variable

add CPU env variable #23

name: Publish Images
on:
push:
branches: ["main"]
env:
REGISTRY: ghcr.io
IMAGE_NAME: ${{ github.repository }}
AIDOCK_COMFYUI_DOCKERFILE: build/aidock-comfyui/client-node.dockerfile
AIDOCK_TAG: -aidock-comfyui
AIDOCK_COMFYUI_IMAGE: ghcr.io/ai-dock/comfyui
AIDOCK_COMFYUI_TAG: latest
COG_COMFYUI_DOCKERFILE: build/cog-comfyui/client-node.dockerfile
COG_TAG: -cog-comfyui
COG_COMFYUI_IMAGE: ghcr.io/paipe-labs/cog-comfyui
COG_COMFYUI_TAG: latest
jobs:
client-node-aidock-comfyui:
runs-on: ubuntu-latest
# `GITHUB_TOKEN` permissions for the actions in this job
permissions:
contents: read
packages: write
steps:
- name: Free Space
run: |
df -h
sudo rm -rf /usr/share/dotnet
sudo rm -rf /opt/ghc
sudo rm -rf /usr/local/.ghcup
sudo rm -rf /usr/local/share/boost
sudo rm -rf /usr/local/lib/android
sudo rm -rf "$AGENT_TOOLSDIRECTORY"
df -h
- name: Checkout Repository
uses: actions/checkout@v4
- name: Login to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Extract Metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@v5
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}${{ env.AIDOCK_TAG }}
- name: Build and Push Docker Image
uses: docker/build-push-action@v5
with:
context: .
file: ${{ env.AIDOCK_COMFYUI_DOCKERFILE }}
build-args: |
AIDOCK_COMFYUI_IMAGE=${{ env.AIDOCK_COMFYUI_IMAGE }}
AIDOCK_COMFYUI_TAG=${{ env.AIDOCK_COMFYUI_TAG }}
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
client-node-cog-comfyui:
runs-on: ubuntu-latest
# `GITHUB_TOKEN` permissions for the actions in this job
permissions:
contents: read
packages: write
steps:
- name: Free Space
run: |
df -h
sudo rm -rf /usr/share/dotnet
sudo rm -rf /opt/ghc
sudo rm -rf /usr/local/.ghcup
sudo rm -rf /usr/local/share/boost
sudo rm -rf /usr/local/lib/android
sudo rm -rf "$AGENT_TOOLSDIRECTORY"
df -h
- name: Checkout Repository
uses: actions/checkout@v4
- name: Login to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Extract Metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@v5
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}${{ env.COG_TAG }}
- name: Build and Push Docker Image
uses: docker/build-push-action@v5
with:
context: .
file: ${{ env.COG_COMFYUI_DOCKERFILE }}
build-args: |
COG_COMFYUI_IMAGE=${{ env.COG_COMFYUI_IMAGE }}
COG_COMFYUI_TAG=${{ env.COG_COMFYUI_TAG }}
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}