use platform for linux/arm64 image #142
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: C/C++ CI docker | |
on: [push] | |
jobs: | |
build: | |
strategy: | |
matrix: | |
include: | |
- image: ubuntu:24.04 | |
label: arm64 | |
platform: linux/arm64 | |
- image: balenalib/raspberry-pi | |
label: armv6l | |
platform: linux/arm/v6 | |
- image: balenalib/raspberry-pi2 | |
label: armv7 | |
platform: linux/arm/v7 | |
- image: ubuntu:24.04 | |
label: amd64 | |
platform: linux/amd64 | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Build an image from Dockerfile | |
run: | | |
docker run --rm --privileged multiarch/qemu-user-static --reset -p yes | |
docker build -t docker.io/${{ github.repository }}:${{ matrix.label }} --platform ${{ matrix.platform }} --build-arg IMAGE=${{ matrix.image }} . |