Skip to content

Commit 5453dae

Browse files
committed
arm64 amd64 union
1 parent 61d45a5 commit 5453dae

File tree

2 files changed

+45
-7
lines changed

2 files changed

+45
-7
lines changed

.github/workflows/CI.yml

Lines changed: 44 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ jobs:
122122

123123
- name: Set up QEMU
124124
uses: docker/setup-qemu-action@v3
125-
125+
126126
- name: Set up Docker Buildx
127127
uses: docker/setup-buildx-action@v3
128128

@@ -132,13 +132,13 @@ jobs:
132132
context: .
133133
load: true
134134
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
136136

137137
# Push to the registry
138138
- run: docker image push "gonorth/docbase" --all-tags
139139

140-
docker-arm64:
141-
name: Build and Push Docker Image
140+
docker-arm:
141+
name: Build and Push Docker Image ARM
142142
needs: build
143143
if: needs.build.outputs.has_update == 'true'
144144
runs-on: ubuntu-24.04-arm
@@ -170,7 +170,7 @@ jobs:
170170
uses: docker/setup-qemu-action@v3
171171
with:
172172
platforms: linux/arm64
173-
173+
174174
- name: Set up Docker Buildx
175175
uses: docker/setup-buildx-action@v3
176176
with:
@@ -182,7 +182,45 @@ jobs:
182182
context: .
183183
load: true
184184
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
186186

187187
# Push to the registry
188188
- 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 }}

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "docbase",
3-
"version": "0.1.1",
3+
"version": "0.1.2",
44
"type": "module",
55
"workspaces": [
66
"packages/*"

0 commit comments

Comments
 (0)