From a07bb34e8313c4a5f6059b2f6e040b794200e141 Mon Sep 17 00:00:00 2001 From: Jim Huang Date: Tue, 5 Nov 2024 01:44:21 +0800 Subject: [PATCH] CI: Fix error when running on host-arm 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 shecc on an Armv7 Ubuntu image, it attempts to pull the native host manifest (either x86_64 or amd), 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. --- .github/workflows/main.yml | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 5c3f5212..42cc69b4 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -34,10 +34,11 @@ jobs: - name: build artifact # The GitHub Action for non-x86 CPU # https://github.com/uraimo/run-on-arch-action - uses: uraimo/run-on-arch-action@v2.7.1 + uses: uraimo/run-on-arch-action@v2 with: - arch: armv7 - distro: ubuntu22.04 + arch: none + distro: none + base_image: "--platform=linux/armv7 armv7/ubuntu:22.04" install: | apt-get update -q -y apt-get install -q -y build-essential