@@ -3,6 +3,15 @@ name: Docker Build and Push All Images to tencentyun
33on :
44 workflow_dispatch :
55 inputs :
6+ version :
7+ description : ' Image version tag (e.g. v1.0.0 or latest)'
8+ required : true
9+ default : ' latest'
10+ push_latest :
11+ description : ' Also push latest tag'
12+ required : false
13+ default : false
14+ type : boolean
615 runner_label_json :
716 description : ' runner array in json format (e.g. ["ubuntu-latest"] or ["self-hosted"])'
817 required : true
@@ -23,10 +32,16 @@ jobs:
2332 uses : actions/checkout@v4
2433 - name : Build main image (amd64) and load locally
2534 run : |
26- docker buildx build --platform linux/amd64 --load -t ccr.ccs.tencentyun.com/nexent-hub/nexent:amd64 -f make/main/Dockerfile --build-arg MIRROR=https://pypi.tuna.tsinghua.edu.cn/simple --build-arg APT_MIRROR=tsinghua .
35+ docker buildx build --platform linux/amd64 --load -t ccr.ccs.tencentyun.com/nexent-hub/nexent:${{ inputs.version }}- amd64 -f make/main/Dockerfile --build-arg MIRROR=https://pypi.tuna.tsinghua.edu.cn/simple --build-arg APT_MIRROR=tsinghua .
2736 - name : Login to Tencent Cloud
2837 run : echo ${{ secrets.TCR_PASSWORD }} | docker login ccr.ccs.tencentyun.com --username=${{ secrets.TCR_USERNAME }} --password-stdin
2938 - name : Push main image (amd64) to Tencent Cloud
39+ run : docker push ccr.ccs.tencentyun.com/nexent-hub/nexent:${{ inputs.version }}-amd64
40+ - name : Tag main image (amd64) as latest
41+ if : inputs.push_latest == 'true'
42+ run : docker tag ccr.ccs.tencentyun.com/nexent-hub/nexent:${{ inputs.version }}-amd64 ccr.ccs.tencentyun.com/nexent-hub/nexent:amd64
43+ - name : Push latest main image (amd64) to Tencent Cloud
44+ if : inputs.push_latest == 'true'
3045 run : docker push ccr.ccs.tencentyun.com/nexent-hub/nexent:amd64
3146
3247 build-and-push-main-arm64 :
@@ -43,10 +58,16 @@ jobs:
4358 uses : actions/checkout@v4
4459 - name : Build main image (arm64) and load locally
4560 run : |
46- docker buildx build --platform linux/arm64 --load -t ccr.ccs.tencentyun.com/nexent-hub/nexent:arm64 -f make/main/Dockerfile --build-arg MIRROR=https://pypi.tuna.tsinghua.edu.cn/simple --build-arg APT_MIRROR=tsinghua .
61+ docker buildx build --platform linux/arm64 --load -t ccr.ccs.tencentyun.com/nexent-hub/nexent:${{ inputs.version }}- arm64 -f make/main/Dockerfile --build-arg MIRROR=https://pypi.tuna.tsinghua.edu.cn/simple --build-arg APT_MIRROR=tsinghua .
4762 - name : Login to Tencent Cloud
4863 run : echo ${{ secrets.TCR_PASSWORD }} | docker login ccr.ccs.tencentyun.com --username=${{ secrets.TCR_USERNAME }} --password-stdin
4964 - name : Push main image (arm64) to Tencent Cloud
65+ run : docker push ccr.ccs.tencentyun.com/nexent-hub/nexent:${{ inputs.version }}-arm64
66+ - name : Tag main image (arm64) as latest
67+ if : inputs.push_latest == 'true'
68+ run : docker tag ccr.ccs.tencentyun.com/nexent-hub/nexent:${{ inputs.version }}-arm64 ccr.ccs.tencentyun.com/nexent-hub/nexent:arm64
69+ - name : Push latest main image (arm64) to Tencent Cloud
70+ if : inputs.push_latest == 'true'
5071 run : docker push ccr.ccs.tencentyun.com/nexent-hub/nexent:arm64
5172
5273 build-and-push-data-process-amd64 :
@@ -72,10 +93,16 @@ jobs:
7293 rm -rf .git .gitattributes
7394 - name : Build data process image (amd64) and load locally
7495 run : |
75- docker buildx build --platform linux/amd64 --load -t ccr.ccs.tencentyun.com/nexent-hub/nexent-data-process:amd64 -f make/data_process/Dockerfile --build-arg MIRROR=https://pypi.tuna.tsinghua.edu.cn/simple --build-arg APT_MIRROR=tsinghua .
96+ docker buildx build --platform linux/amd64 --load -t ccr.ccs.tencentyun.com/nexent-hub/nexent-data-process:${{ inputs.version }}- amd64 -f make/data_process/Dockerfile --build-arg MIRROR=https://pypi.tuna.tsinghua.edu.cn/simple --build-arg APT_MIRROR=tsinghua .
7697 - name : Login to Tencent Cloud
7798 run : echo ${{ secrets.TCR_PASSWORD }} | docker login ccr.ccs.tencentyun.com --username=${{ secrets.TCR_USERNAME }} --password-stdin
7899 - name : Push data process image (amd64) to Tencent Cloud
100+ run : docker push ccr.ccs.tencentyun.com/nexent-hub/nexent-data-process:${{ inputs.version }}-amd64
101+ - name : Tag data process image (amd64) as latest
102+ if : inputs.push_latest == 'true'
103+ run : docker tag ccr.ccs.tencentyun.com/nexent-hub/nexent-data-process:${{ inputs.version }}-amd64 ccr.ccs.tencentyun.com/nexent-hub/nexent-data-process:amd64
104+ - name : Push latest data process image (amd64) to Tencent Cloud
105+ if : inputs.push_latest == 'true'
79106 run : docker push ccr.ccs.tencentyun.com/nexent-hub/nexent-data-process:amd64
80107
81108 build-and-push-data-process-arm64 :
@@ -101,10 +128,16 @@ jobs:
101128 rm -rf .git .gitattributes
102129 - name : Build data process image (arm64) and load locally
103130 run : |
104- docker buildx build --platform linux/arm64 --load -t ccr.ccs.tencentyun.com/nexent-hub/nexent-data-process:arm64 -f make/data_process/Dockerfile --build-arg MIRROR=https://pypi.tuna.tsinghua.edu.cn/simple --build-arg APT_MIRROR=tsinghua .
131+ docker buildx build --platform linux/arm64 --load -t ccr.ccs.tencentyun.com/nexent-hub/nexent-data-process:${{ inputs.version }}- arm64 -f make/data_process/Dockerfile --build-arg MIRROR=https://pypi.tuna.tsinghua.edu.cn/simple --build-arg APT_MIRROR=tsinghua .
105132 - name : Login to Tencent Cloud
106133 run : echo ${{ secrets.TCR_PASSWORD }} | docker login ccr.ccs.tencentyun.com --username=${{ secrets.TCR_USERNAME }} --password-stdin
107134 - name : Push data process image (arm64) to Tencent Cloud
135+ run : docker push ccr.ccs.tencentyun.com/nexent-hub/nexent-data-process:${{ inputs.version }}-arm64
136+ - name : Tag data process image (arm64) as latest
137+ if : inputs.push_latest == 'true'
138+ run : docker tag ccr.ccs.tencentyun.com/nexent-hub/nexent-data-process:${{ inputs.version }}-arm64 ccr.ccs.tencentyun.com/nexent-hub/nexent-data-process:arm64
139+ - name : Push latest data process image (arm64) to Tencent Cloud
140+ if : inputs.push_latest == 'true'
108141 run : docker push ccr.ccs.tencentyun.com/nexent-hub/nexent-data-process:arm64
109142
110143 build-and-push-web-amd64 :
@@ -121,10 +154,16 @@ jobs:
121154 uses : actions/checkout@v4
122155 - name : Build web image (amd64) and load locally
123156 run : |
124- docker buildx build --platform linux/amd64 --load -t ccr.ccs.tencentyun.com/nexent-hub/nexent-web:amd64 -f make/web/Dockerfile --build-arg MIRROR=https://registry.npmmirror.com --build-arg APK_MIRROR=tsinghua .
157+ docker buildx build --platform linux/amd64 --load -t ccr.ccs.tencentyun.com/nexent-hub/nexent-web:${{ inputs.version }}- amd64 -f make/web/Dockerfile --build-arg MIRROR=https://registry.npmmirror.com --build-arg APK_MIRROR=tsinghua .
125158 - name : Login to Tencent Cloud
126159 run : echo ${{ secrets.TCR_PASSWORD }} | docker login ccr.ccs.tencentyun.com --username=${{ secrets.TCR_USERNAME }} --password-stdin
127160 - name : Push web image (amd64) to Tencent Cloud
161+ run : docker push ccr.ccs.tencentyun.com/nexent-hub/nexent-web:${{ inputs.version }}-amd64
162+ - name : Tag web image (amd64) as latest
163+ if : inputs.push_latest == 'true'
164+ run : docker tag ccr.ccs.tencentyun.com/nexent-hub/nexent-web:${{ inputs.version }}-amd64 ccr.ccs.tencentyun.com/nexent-hub/nexent-web:amd64
165+ - name : Push latest web image (amd64) to Tencent Cloud
166+ if : inputs.push_latest == 'true'
128167 run : docker push ccr.ccs.tencentyun.com/nexent-hub/nexent-web:amd64
129168
130169 build-and-push-web-arm64 :
@@ -141,10 +180,16 @@ jobs:
141180 uses : actions/checkout@v4
142181 - name : Build web image (arm64) and load locally
143182 run : |
144- docker buildx build --platform linux/arm64 --load -t ccr.ccs.tencentyun.com/nexent-hub/nexent-web:arm64 -f make/web/Dockerfile --build-arg MIRROR=https://registry.npmmirror.com --build-arg APK_MIRROR=tsinghua .
183+ docker buildx build --platform linux/arm64 --load -t ccr.ccs.tencentyun.com/nexent-hub/nexent-web:${{ inputs.version }}- arm64 -f make/web/Dockerfile --build-arg MIRROR=https://registry.npmmirror.com --build-arg APK_MIRROR=tsinghua .
145184 - name : Login to Tencent Cloud
146185 run : echo ${{ secrets.TCR_PASSWORD }} | docker login ccr.ccs.tencentyun.com --username=${{ secrets.TCR_USERNAME }} --password-stdin
147186 - name : Push web image (arm64) to Tencent Cloud
187+ run : docker push ccr.ccs.tencentyun.com/nexent-hub/nexent-web:${{ inputs.version }}-arm64
188+ - name : Tag web image (arm64) as latest
189+ if : inputs.push_latest == 'true'
190+ run : docker tag ccr.ccs.tencentyun.com/nexent-hub/nexent-web:${{ inputs.version }}-arm64 ccr.ccs.tencentyun.com/nexent-hub/nexent-web:arm64
191+ - name : Push latest web image (arm64) to Tencent Cloud
192+ if : inputs.push_latest == 'true'
148193 run : docker push ccr.ccs.tencentyun.com/nexent-hub/nexent-web:arm64
149194
150195 build-and-push-terminal-amd64 :
@@ -161,10 +206,16 @@ jobs:
161206 uses : actions/checkout@v4
162207 - name : Build terminal image (amd64) and load locally
163208 run : |
164- docker buildx build --platform linux/amd64 --load -t ccr.ccs.tencentyun.com/nexent-hub/nexent-ubuntu-terminal:amd64 -f make/terminal/Dockerfile .
209+ docker buildx build --platform linux/amd64 --load -t ccr.ccs.tencentyun.com/nexent-hub/nexent-ubuntu-terminal:${{ inputs.version }}- amd64 -f make/terminal/Dockerfile .
165210 - name : Login to Tencent Cloud
166211 run : echo ${{ secrets.TCR_PASSWORD }} | docker login ccr.ccs.tencentyun.com --username=${{ secrets.TCR_USERNAME }} --password-stdin
167212 - name : Push terminal image (amd64) to Tencent Cloud
213+ run : docker push ccr.ccs.tencentyun.com/nexent-hub/nexent-ubuntu-terminal:${{ inputs.version }}-amd64
214+ - name : Tag terminal image (amd64) as latest
215+ if : inputs.push_latest == 'true'
216+ run : docker tag ccr.ccs.tencentyun.com/nexent-hub/nexent-ubuntu-terminal:${{ inputs.version }}-amd64 ccr.ccs.tencentyun.com/nexent-hub/nexent-ubuntu-terminal:amd64
217+ - name : Push latest terminal image (amd64) to Tencent Cloud
218+ if : inputs.push_latest == 'true'
168219 run : docker push ccr.ccs.tencentyun.com/nexent-hub/nexent-ubuntu-terminal:amd64
169220
170221 build-and-push-terminal-arm64 :
@@ -181,10 +232,16 @@ jobs:
181232 uses : actions/checkout@v4
182233 - name : Build terminal image (arm64) and load locally
183234 run : |
184- docker buildx build --platform linux/arm64 --load -t ccr.ccs.tencentyun.com/nexent-hub/nexent-ubuntu-terminal:arm64 -f make/terminal/Dockerfile .
235+ docker buildx build --platform linux/arm64 --load -t ccr.ccs.tencentyun.com/nexent-hub/nexent-ubuntu-terminal:${{ inputs.version }}- arm64 -f make/terminal/Dockerfile .
185236 - name : Login to Tencent Cloud
186237 run : echo ${{ secrets.TCR_PASSWORD }} | docker login ccr.ccs.tencentyun.com --username=${{ secrets.TCR_USERNAME }} --password-stdin
187238 - name : Push terminal image (arm64) to Tencent Cloud
239+ run : docker push ccr.ccs.tencentyun.com/nexent-hub/nexent-ubuntu-terminal:${{ inputs.version }}-arm64
240+ - name : Tag terminal image (arm64) as latest
241+ if : inputs.push_latest == 'true'
242+ run : docker tag ccr.ccs.tencentyun.com/nexent-hub/nexent-ubuntu-terminal:${{ inputs.version }}-arm64 ccr.ccs.tencentyun.com/nexent-hub/nexent-ubuntu-terminal:arm64
243+ - name : Push latest terminal image (arm64) to Tencent Cloud
244+ if : inputs.push_latest == 'true'
188245 run : docker push ccr.ccs.tencentyun.com/nexent-hub/nexent-ubuntu-terminal:arm64
189246
190247 manifest-push-main :
@@ -196,6 +253,13 @@ jobs:
196253 - name : Login to Tencent Cloud
197254 run : echo ${{ secrets.TCR_PASSWORD }} | docker login ccr.ccs.tencentyun.com --username=${{ secrets.TCR_USERNAME }} --password-stdin
198255 - name : Create and push manifest for main (Tencent Cloud)
256+ run : |
257+ docker manifest create ccr.ccs.tencentyun.com/nexent-hub/nexent:${{ inputs.version }} \
258+ ccr.ccs.tencentyun.com/nexent-hub/nexent:${{ inputs.version }}-amd64 \
259+ ccr.ccs.tencentyun.com/nexent-hub/nexent:${{ inputs.version }}-arm64
260+ docker manifest push ccr.ccs.tencentyun.com/nexent-hub/nexent:${{ inputs.version }}
261+ - name : Create and push latest manifest for main (Tencent Cloud)
262+ if : inputs.push_latest == 'true'
199263 run : |
200264 docker manifest create ccr.ccs.tencentyun.com/nexent-hub/nexent:latest \
201265 ccr.ccs.tencentyun.com/nexent-hub/nexent:amd64 \
@@ -211,6 +275,13 @@ jobs:
211275 - name : Login to Tencent Cloud
212276 run : echo ${{ secrets.TCR_PASSWORD }} | docker login ccr.ccs.tencentyun.com --username=${{ secrets.TCR_USERNAME }} --password-stdin
213277 - name : Create and push manifest for data-process (Tencent Cloud)
278+ run : |
279+ docker manifest create ccr.ccs.tencentyun.com/nexent-hub/nexent-data-process:${{ inputs.version }} \
280+ ccr.ccs.tencentyun.com/nexent-hub/nexent-data-process:${{ inputs.version }}-amd64 \
281+ ccr.ccs.tencentyun.com/nexent-hub/nexent-data-process:${{ inputs.version }}-arm64
282+ docker manifest push ccr.ccs.tencentyun.com/nexent-hub/nexent-data-process:${{ inputs.version }}
283+ - name : Create and push latest manifest for data-process (Tencent Cloud)
284+ if : inputs.push_latest == 'true'
214285 run : |
215286 docker manifest create ccr.ccs.tencentyun.com/nexent-hub/nexent-data-process:latest \
216287 ccr.ccs.tencentyun.com/nexent-hub/nexent-data-process:amd64 \
@@ -226,6 +297,13 @@ jobs:
226297 - name : Login to Tencent Cloud
227298 run : echo ${{ secrets.TCR_PASSWORD }} | docker login ccr.ccs.tencentyun.com --username=${{ secrets.TCR_USERNAME }} --password-stdin
228299 - name : Create and push manifest for web (Tencent Cloud)
300+ run : |
301+ docker manifest create ccr.ccs.tencentyun.com/nexent-hub/nexent-web:${{ inputs.version }} \
302+ ccr.ccs.tencentyun.com/nexent-hub/nexent-web:${{ inputs.version }}-amd64 \
303+ ccr.ccs.tencentyun.com/nexent-hub/nexent-web:${{ inputs.version }}-arm64
304+ docker manifest push ccr.ccs.tencentyun.com/nexent-hub/nexent-web:${{ inputs.version }}
305+ - name : Create and push latest manifest for web (Tencent Cloud)
306+ if : inputs.push_latest == 'true'
229307 run : |
230308 docker manifest create ccr.ccs.tencentyun.com/nexent-hub/nexent-web:latest \
231309 ccr.ccs.tencentyun.com/nexent-hub/nexent-web:amd64 \
@@ -241,6 +319,13 @@ jobs:
241319 - name : Login to Tencent Cloud
242320 run : echo ${{ secrets.TCR_PASSWORD }} | docker login ccr.ccs.tencentyun.com --username=${{ secrets.TCR_USERNAME }} --password-stdin
243321 - name : Create and push manifest for terminal (Tencent Cloud)
322+ run : |
323+ docker manifest create ccr.ccs.tencentyun.com/nexent-hub/nexent-ubuntu-terminal:${{ inputs.version }} \
324+ ccr.ccs.tencentyun.com/nexent-hub/nexent-ubuntu-terminal:${{ inputs.version }}-amd64 \
325+ ccr.ccs.tencentyun.com/nexent-hub/nexent-ubuntu-terminal:${{ inputs.version }}-arm64
326+ docker manifest push ccr.ccs.tencentyun.com/nexent-hub/nexent-ubuntu-terminal:${{ inputs.version }}
327+ - name : Create and push latest manifest for terminal (Tencent Cloud)
328+ if : inputs.push_latest == 'true'
244329 run : |
245330 docker manifest create ccr.ccs.tencentyun.com/nexent-hub/nexent-ubuntu-terminal:latest \
246331 ccr.ccs.tencentyun.com/nexent-hub/nexent-ubuntu-terminal:amd64 \
0 commit comments