@@ -122,7 +122,7 @@ jobs:
122
122
123
123
- name : Set up QEMU
124
124
uses : docker/setup-qemu-action@v3
125
-
125
+
126
126
- name : Set up Docker Buildx
127
127
uses : docker/setup-buildx-action@v3
128
128
@@ -132,13 +132,13 @@ jobs:
132
132
context : .
133
133
load : true
134
134
push : false
135
- tags : gonorth/docbase:latest,gonorth/docbase:${{ steps.package-version.outputs.current-version }}
135
+ tags : gonorth/docbase:latest-x86 ,gonorth/docbase:${{ steps.package-version.outputs.current-version }}-x86
136
136
137
137
# Push to the registry
138
138
- run : docker image push "gonorth/docbase" --all-tags
139
139
140
- docker-arm64 :
141
- name : Build and Push Docker Image
140
+ docker-arm :
141
+ name : Build and Push Docker Image ARM
142
142
needs : build
143
143
if : needs.build.outputs.has_update == 'true'
144
144
runs-on : ubuntu-24.04-arm
@@ -170,7 +170,7 @@ jobs:
170
170
uses : docker/setup-qemu-action@v3
171
171
with :
172
172
platforms : linux/arm64
173
-
173
+
174
174
- name : Set up Docker Buildx
175
175
uses : docker/setup-buildx-action@v3
176
176
with :
@@ -182,7 +182,45 @@ jobs:
182
182
context : .
183
183
load : true
184
184
push : false
185
- tags : gonorth/docbase:latest,gonorth/docbase:${{ steps.package-version.outputs.current-version }}
185
+ tags : gonorth/docbase:latest-arm ,gonorth/docbase:${{ steps.package-version.outputs.current-version }}-arm
186
186
187
187
# Push to the registry
188
188
- run : docker image push "gonorth/docbase" --all-tags
189
+
190
+ docker-union :
191
+ name : Union Docker Image
192
+ needs :
193
+ - docker
194
+ - docker-arm
195
+ runs-on : ubuntu-latest
196
+ steps :
197
+ - name : Checkout
198
+ uses : actions/checkout@v4
199
+
200
+ # 登录到 Docker Hub
201
+ - name : Login to Docker Hub
202
+ uses : docker/login-action@v3
203
+ with :
204
+ username : gonorth
205
+ password : ${{ secrets.DOCKERHUB_TOKEN }}
206
+
207
+ - name : get-npm-version
208
+ id : package-version
209
+ uses :
martinbeentjes/[email protected]
210
+
211
+ - name : Build and push
212
+ uses : docker/build-push-action@v6
213
+ with :
214
+ context : .
215
+ load : true
216
+ push : false
217
+
218
+ - run : docker manifest create gonorth/docbase:latest gonorth/docbase:latest-x86 gonorth/docbase:latest-arm --amend
219
+ - run : docker manifest annotate gonorth/docbase:latest gonorth/docbase:latest-x86 --os linux --arch amd64
220
+ - run : docker manifest annotate gonorth/docbase:latest gonorth/docbase:latest-arm --os linux --arch arm
221
+ - run : docker manifest push gonorth/docbase:latest
222
+
223
+ - run : docker manifest create gonorth/docbase:${{ steps.package-version.outputs.current-version }} gonorth/docbase:${{ steps.package-version.outputs.current-version }}-x86 gonorth/docbase:${{ steps.package-version.outputs.current-version }}-arm --amend
224
+ - run : docker manifest annotate gonorth/docbase:${{ steps.package-version.outputs.current-version }} gonorth/docbase:${{ steps.package-version.outputs.current-version }}-x86 --os linux --arch amd64
225
+ - run : docker manifest annotate gonorth/docbase:${{ steps.package-version.outputs.current-version }} gonorth/docbase:${{ steps.package-version.outputs.current-version }}-arm --os linux --arch arm
226
+ - run : docker manifest push gonorth/docbase:${{ steps.package-version.outputs.current-version }}
0 commit comments