Skip to content

Commit 0964604

Browse files
authored
build: Add an image for the linux/arm64/v8 platform (#1470)
1 parent 815f6d1 commit 0964604

File tree

1 file changed

+16
-4
lines changed

1 file changed

+16
-4
lines changed

.github/workflows/release.yaml

+16-4
Original file line numberDiff line numberDiff line change
@@ -187,7 +187,7 @@ jobs:
187187
echo "DOCKER_TAGS=ghcr.io/box-project/box" >> $GITHUB_ENV
188188
echo "DOCKER_TEST_TAG=ghcr.io/box-project/box" >> $GITHUB_ENV
189189
190-
- name: Build and export to Docker
190+
- name: Build and export to Docker (amd64)
191191
uses: docker/build-push-action@v6
192192
with:
193193
context: .
@@ -196,15 +196,27 @@ jobs:
196196
tags: ${{ env.DOCKER_TAGS }}
197197
load: true
198198

199-
- name: Test the (release) image
200-
run: docker run --rm ${{ env.DOCKER_TEST_TAG }} --version
199+
- name: Test the (release) image (amd64)
200+
run: docker run --rm --platform=linux/amd64 ${{ env.DOCKER_TEST_TAG }} --version
201+
202+
- name: Build and export to Docker (arm64)
203+
uses: docker/build-push-action@v6
204+
with:
205+
context: .
206+
file: ${{ env.DOCKERFILE }}
207+
platforms: linux/arm64/v8
208+
tags: ${{ env.DOCKER_TAGS }}
209+
load: true
210+
211+
- name: Test the (release) image (arm64)
212+
run: docker run --rm --platform=linux/arm64/v8 ${{ env.DOCKER_TEST_TAG }} --version
201213

202214
- name: Build and push
203215
if: github.event_name == 'release'
204216
uses: docker/build-push-action@v6
205217
with:
206218
context: .
207219
file: ${{ env.DOCKERFILE }}
208-
platforms: linux/amd64
220+
platforms: linux/amd64,linux/arm64/v8
209221
tags: ${{ env.DOCKER_TAGS }}
210222
push: true

0 commit comments

Comments
 (0)