Skip to content

Add arm64 builds

Add arm64 builds #38

Workflow file for this run

name: build
on:
pull_request:
push:
tags:
- '*'
workflow_dispatch:
permissions:
contents: read
jobs:
test:
runs-on: ubuntu-latest
strategy:
matrix:
platform: [ linux/amd64, linux/arm64 ]
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Go
uses: actions/setup-go@v5
with:
go-version-file: 'go.mod'
cache: true
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
with:
platforms: ${{ matrix.platform }}
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
with:
version: latest
- name: Run Bake
run: docker buildx bake --file bake.hcl --set *.platform=${{ matrix.platform }} --load
- name: Run Unit Tests in Docker
run: |
docker run --rm --privileged tonistiigi/binfmt --install all
docker buildx create --use
docker buildx build --platform ${{ matrix.platform }} --file Dockerfile --target test .