Skip to content

Commit e30a06e

Browse files
committed
Add linux/arm64 platforms to image builds
1 parent faa26ae commit e30a06e

File tree

4 files changed

+8
-0
lines changed

4 files changed

+8
-0
lines changed

.github/workflows/build.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,8 @@ jobs:
1818
registry: ghcr.io
1919
username: matteodelabre
2020
password: ${{ secrets.CR_PAT }}
21+
- name: Set up QEMU
22+
uses: docker/setup-qemu-action@v3
2123
- name: Build and publish images
2224
run: |
2325
./scripts/build -p .

.github/workflows/pr.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@ jobs:
1414
steps:
1515
- name: Checkout the Git repository
1616
uses: actions/checkout@v3
17+
- name: Set up QEMU
18+
uses: docker/setup-qemu-action@v3
1719
- name: Build images
1820
run: |
1921
./scripts/build .

.github/workflows/release.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,8 @@ jobs:
1616
registry: ghcr.io
1717
username: matteodelabre
1818
password: ${{ secrets.CR_PAT }}
19+
- name: Set up QEMU
20+
uses: docker/setup-qemu-action@v3
1921
- name: Build and publish images
2022
run: |
2123
version="$(echo "${{ github.ref }}" | cut -d / -f 3)"

scripts/build

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,7 @@ version="$2"
4848
# Enable BuildKit for better cache behavior
4949
# See <https://docs.docker.com/engine/reference/builder/#buildkit>
5050
export DOCKER_BUILDKIT=1
51+
docker buildx create --use
5152

5253
docker-build() {
5354
from="$(image-name "$1" "$version")"
@@ -57,6 +58,7 @@ docker-build() {
5758
--build-arg BUILDKIT_INLINE_CACHE=1 \
5859
--build-arg FROM="$from" \
5960
--cache-from "$(image-name "$2")" \
61+
--platform linux/amd64,linux/arm64 \
6062
--tag "$target" .
6163

6264
if [[ -n $publishflag ]]; then

0 commit comments

Comments
 (0)