Skip to content

Commit

Permalink
CI: Fix error when running on host-arm
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
jserv committed Nov 4, 2024
1 parent 6261f31 commit a07bb34
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit a07bb34

Please sign in to comment.