@@ -13,14 +13,17 @@ jobs:
13
13
context : ./runtime
14
14
dockerfile : ./runtime/Dockerfile.no-package
15
15
tag : ghcr.io/codefuse-ai/runtime:0.1.0
16
+ tag_latest : ghcr.io/codefuse-ai/runtime:latest
16
17
- name : ekgfrontend
17
18
context : .
18
19
dockerfile : ./Dockerfile_frontend
19
20
tag : ghcr.io/codefuse-ai/ekgfrontend:0.1.0
21
+ tag_latest : ghcr.io/codefuse-ai/ekgfrontend:latest
20
22
- name : ekgservice
21
23
context : .
22
24
dockerfile : ./Dockerfile_gh
23
25
tag : ghcr.io/codefuse-ai/ekgservice:0.1.0
26
+ tag_latest : ghcr.io/codefuse-ai/ekgservice:latest
24
27
25
28
steps :
26
29
- name : Checkout code
39
42
username : ${{ github.actor }} # 使用当前 GitHub 用户名
40
43
password : ${{ secrets.CR_TOKEN }} # 使用您刚刚添加的个人访问令牌
41
44
42
- # - name: docker image
43
- # run: |
44
- # docker images
45
- # docker pull --platform linux/arm64 python:3.9-slim-bookworm
46
- # docker tag python:3.9-slim-bookworm ghcr.io/lightislost/python:3.9-slim-bookworm-arm64
47
- # docker rmi python:3.9-slim-bookworm
48
- # docker push ghcr.io/lightislost/python:3.9-slim-bookworm-arm64
49
- # docker images
50
-
51
- # - name: docker image
52
- # run: |
53
- # docker images
54
- # docker pull --platform linux/amd64 python:3.9-slim-bookworm
55
- # docker tag python:3.9-slim-bookworm ghcr.io/lightislost/python:3.9-slim-bookworm-amd64
56
- # docker rmi python:3.9-slim-bookworm
57
- # docker push ghcr.io/lightislost/python:3.9-slim-bookworm-amd64
58
- # docker images
59
- # docker manifest create ghcr.io/lightislost/python:3.9-slim-bookworm ghcr.io/lightislost/python:3.9-slim-bookworm-arm64 ghcr.io/lightislost/python:3.9-slim-bookworm-amd64
60
- # docker manifest inspect ghcr.io/lightislost/python:3.9-slim-bookworm
61
-
62
- # - name: Build and push adm64
63
- # uses: docker/build-push-action@v2
64
- # with:
65
- # context: ${{ matrix.image.context }}
66
- # file: ${{ matrix.image.dockerfile }}
67
- # push: true
68
- # tags: ${{ matrix.image.tag }}-amd64
69
- # platforms: linux/amd64
70
-
71
45
- name : Build and push with retry for amd64
72
46
run : |
73
47
max_retries=5
79
53
docker build --push \
80
54
--platform linux/amd64 \
81
55
--tag ${{ matrix.image.tag }}-amd64 \
56
+ --tag ${{ matrix.image.tag_latest }}-amd64 \
82
57
-f ${{ matrix.image.dockerfile }} ${{ matrix.image.context }} && success=true && break
83
58
84
59
count=$(($count + 1))
@@ -95,15 +70,10 @@ jobs:
95
70
run : |
96
71
df -h
97
72
docker images
98
-
99
- # - name: Build and push amr64
100
- # uses: docker/build-push-action@v2
101
- # with:
102
- # context: ${{ matrix.image.context }}
103
- # file: ${{ matrix.image.dockerfile }}
104
- # push: true
105
- # tags: ${{ matrix.image.tag }}-arm64
106
- # platforms: linux/arm64
73
+ docker rmi ${{ matrix.image.tag }}-amd64
74
+ docker rmi ${{ matrix.image.tag_latest }}-amd64
75
+ df -h
76
+ docker images
107
77
108
78
- name : Build and push with retry for arm64
109
79
run : |
116
86
docker build --push \
117
87
--platform linux/arm64 \
118
88
--tag ${{ matrix.image.tag }}-arm64 \
89
+ --tag ${{ matrix.image.tag_latest }}-arm64 \
119
90
-f ${{ matrix.image.dockerfile }} ${{ matrix.image.context }} && success=true && break
120
91
121
92
count=$(($count + 1))
@@ -132,15 +103,52 @@ jobs:
132
103
run : |
133
104
df -h
134
105
docker images
106
+ docker rmi ${{ matrix.image.tag }}-arm64
107
+ docker rmi ${{ matrix.image.tag_latest }}-arm64
108
+ df -h
109
+ docker images
135
110
136
111
- name : docker manifest
137
112
run : |
138
113
docker images
139
- docker manifest inspect ${{ matrix.image.tag }}-arm64
140
- docker manifest inspect ${{ matrix.image.tag }}-amd64
114
+
141
115
docker manifest create ${{ matrix.image.tag }} ${{ matrix.image.tag }}-arm64 ${{ matrix.image.tag }}-amd64
116
+ docker manifest create ${{ matrix.image.tag_latest }} ${{ matrix.image.tag_latest }}-arm64 ${{ matrix.image.tag_latest }}-amd64
117
+
142
118
docker manifest inspect ${{ matrix.image.tag }}
119
+ docker manifest inspect ${{ matrix.image.tag_latest }}
120
+
143
121
docker manifest push ${{ matrix.image.tag }}
122
+ docker manifest push ${{ matrix.image.tag_latest }}
144
123
145
124
- name : Check disk space
146
- run : df -h
125
+ run : df -h
126
+
127
+ # - name: docker image
128
+ # run: |
129
+ # docker images
130
+ # docker pull --platform linux/arm64 python:3.9-slim-bookworm
131
+ # docker tag python:3.9-slim-bookworm ghcr.io/lightislost/python:3.9-slim-bookworm-arm64
132
+ # docker rmi python:3.9-slim-bookworm
133
+ # docker push ghcr.io/lightislost/python:3.9-slim-bookworm-arm64
134
+ # docker images
135
+
136
+ # - name: docker image
137
+ # run: |
138
+ # docker images
139
+ # docker pull --platform linux/amd64 python:3.9-slim-bookworm
140
+ # docker tag python:3.9-slim-bookworm ghcr.io/lightislost/python:3.9-slim-bookworm-amd64
141
+ # docker rmi python:3.9-slim-bookworm
142
+ # docker push ghcr.io/lightislost/python:3.9-slim-bookworm-amd64
143
+ # docker images
144
+ # docker manifest create ghcr.io/lightislost/python:3.9-slim-bookworm ghcr.io/lightislost/python:3.9-slim-bookworm-arm64 ghcr.io/lightislost/python:3.9-slim-bookworm-amd64
145
+ # docker manifest inspect ghcr.io/lightislost/python:3.9-slim-bookworm
146
+
147
+ # - name: Build and push adm64
148
+ # uses: docker/build-push-action@v2
149
+ # with:
150
+ # context: ${{ matrix.image.context }}
151
+ # file: ${{ matrix.image.dockerfile }}
152
+ # push: true
153
+ # tags: ${{ matrix.image.tag }}-amd64
154
+ # platforms: linux/amd64
0 commit comments