-
Notifications
You must be signed in to change notification settings - Fork 0
110 lines (100 loc) · 3.34 KB
/
publish-images.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
name: Publish client-node Docker Images to ghcr.io
on:
push:
branches: ["main"]
pull_request:
branches: ["main"]
env:
REGISTRY: ghcr.io
IMAGE_NAME: ${{ github.repository }}
AIDOCK_COMFYUI_DOCKERFILE: build/client-node-inference.dockerfile
AIDOCK_TAG: -aidock-comfyui
AIDOCK_COMFYUI_IMAGE: ghcr.io/ai-dock/comfyui
AIDOCK_COMFYUI_TAG: pytorch-2.2.0-py3.10-cuda-11.8.0-runtime-22.04
COG_COMFYUI_DOCKERFILE: build/client-node-inference.dockerfile
COG_TAG: -cog-comfyui
COG_COMFYUI_IMAGE: ghcr.io/paipe-labs/cog-comfyui
COG_COMFYUI_TAG: latest
jobs:
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
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: |
INFERENCE_IMAGE=${{ env.AIDOCK_COMFYUI_IMAGE }}
INFERENCE_TAG=${{ env.AIDOCK_COMFYUI_TAG }}
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
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
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: |
INFERENCE_IMAGE=${{ env.COG_COMFYUI_IMAGE }}
INFERENCE_TAG=${{ env.COG_COMFYUI_TAG }}
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}