Skip to content

Commit e410079

Browse files
committed
Multiplatform docker builds
1 parent 17e31c7 commit e410079

File tree

1 file changed

+13
-8
lines changed

1 file changed

+13
-8
lines changed

.github/workflows/releases.yml

Lines changed: 13 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -16,19 +16,24 @@ jobs:
1616
steps:
1717
- uses: actions/checkout@v2
1818

19-
- name: Build Docker image
20-
run: docker build . --tag "$IMAGE_NAME:${{ github.event.release.tag_name }}"
19+
# https://github.com/docker/setup-qemu-action
20+
- name: Set up QEMU
21+
uses: docker/setup-qemu-action@v1
22+
23+
# https://github.com/docker/setup-buildx-action
24+
- name: Set up Docker Buildx
25+
uses: docker/setup-buildx-action@v1
2126

2227
- name: Log into registry
2328
run: echo "${{ secrets.DOCKERHUB_PASSWORD }}" | docker login -u $DOCKERHUB_USERNAME --password-stdin
2429

25-
- name: Push api image
26-
run: docker push $IMAGE_NAME:${{ github.event.release.tag_name }}
27-
28-
- name: Tag as latest and push
30+
- name: Build Docker image
2931
run: |
30-
docker tag "$IMAGE_NAME:${{ github.event.release.tag_name}}" $IMAGE_NAME:latest
31-
docker push $IMAGE_NAME:latest
32+
docker buildx build . \
33+
--push \
34+
--platform linux/arm/v7,linux/arm64/v8,linux/amd64 \
35+
--tag "$IMAGE_NAME:latest" \
36+
--tag "$IMAGE_NAME:${{ github.event.release.tag_name}}"
3237
3338
# This action does not yet work with dockerhub personal access token
3439
# Issue: https://github.com/peter-evans/dockerhub-description/issues/10

0 commit comments

Comments
 (0)