From 07e4cf25d485d384ee28928cb10b5b6940d3f23e Mon Sep 17 00:00:00 2001 From: ChinYikMing Date: Sun, 20 Oct 2024 05:22:36 +0800 Subject: [PATCH] CI: Fix error when running on host-arm64 When pulling a base image from Docker Hub, the architecture defaults to that of the native host, which is typically x86_64 or amd64 on GitHub runners. Since the run-on-arch-action GitHub Action aims to run rv32emu on an ARM64 Ubuntu image, it attempts to pull the native host manifest (either x86_64 or amd64), resulting in a 'no match for platform in manifest' error unless the --platform option is specified. Therefore, specifying the --platform option as linux/arm64 resolves this issue. Close #502 --- .github/workflows/main.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 00f2dd4b..6b7050aa 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -94,8 +94,9 @@ jobs: # https://github.com/uraimo/run-on-arch-action uses: uraimo/run-on-arch-action@v2 with: - arch: aarch64 - distro: ubuntu22.04 + arch: none + distro: none + base_image: "--platform=linux/arm64 arm64v8/ubuntu:22.04" # No 'sudo' is available install: | apt-get update -q -y