Skip to content

Commit af5a6b7

Browse files
mikeryMichael de Hoog
andauthored
Publish arm64 Docker images (#190)
* Enable multi-platform builds * Bump docker/login-action * Enable push * Add multi-arch build to PR action --------- Co-authored-by: Michael de Hoog <michael.dehoog@coinbase.com>
1 parent 525775b commit af5a6b7

File tree

2 files changed

+11
-1
lines changed

2 files changed

+11
-1
lines changed

.github/workflows/docker.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ jobs:
1919
uses: actions/checkout@v2
2020

2121
- name: Log into the Container registry
22-
uses: docker/login-action@v2
22+
uses: docker/login-action@v3
2323
with:
2424
registry: ${{ env.REGISTRY }}
2525
username: ${{ github.actor }}
@@ -31,10 +31,14 @@ jobs:
3131
with:
3232
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
3333

34+
- name: Set up Docker Buildx
35+
uses: docker/setup-buildx-action@v3
36+
3437
- name: Build and push the Docker image
3538
uses: docker/build-push-action@v4
3639
with:
3740
context: .
3841
push: true
3942
tags: ${{ steps.meta.outputs.tags }}
4043
labels: ${{ steps.meta.outputs.labels }}
44+
platforms: linux/amd64,linux/arm64

.github/workflows/pr.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,19 @@ on:
66
jobs:
77
build:
88
runs-on: ubuntu-latest
9+
strategy:
10+
matrix:
11+
arch: [ linux/amd64, linux/arm64 ]
912
steps:
1013
- name: Checkout
1114
uses: actions/checkout@v3
1215
with:
1316
ref: ${{ github.event.pull_request.head.sha }}
17+
- name: Set up Docker Buildx
18+
uses: docker/setup-buildx-action@v3
1419
- name: Build the Docker image
1520
uses: docker/build-push-action@v4
1621
with:
1722
context: .
1823
push: false
24+
platforms: ${{ matrix.arch }}

0 commit comments

Comments
 (0)