uraimo / run-on-arch-action

A Github Action that executes jobs/commands on non-x86 cpu architectures (ARMv6, ARMv7, aarch64, s390x, ppc64le, riscv64) via QEMU
BSD 3-Clause "New" or "Revised" License
682 stars 151 forks source link

The requested image's platform does not match the detected host platform #127

Closed EmixamPP closed 1 year ago

EmixamPP commented 1 year ago

Hello,

Firstly, thanks for this action, it's really very useful.

However, I have the following warning in the logs:

Step 1/3 : FROM arm64v8/ubuntu:latest
latest: Pulling from arm64v8/ubuntu
b2837baf7808: Pulling fs layer
b2837baf7808: Verifying Checksum
b2837baf7808: Download complete
b2837baf7808: Pull complete
Digest: sha256:25de8a960c338b7d38aa15c012ceee70d8e29239db97596d6ecc50a5085d8f7a
Status: Downloaded newer image for arm64v8/ubuntu:latest
---> cfb01e8e3121
Step 2/3 : COPY ./run-on-arch-install.sh /root/run-on-arch-install.sh
---> 35dc15c3ca98
Step 3/3 : RUN chmod +x /root/run-on-arch-install.sh && /root/run-on-arch-install.sh
---> [Warning] The requested image's platform (linux/arm64/v8) does not match the detected host platform (linux/amd64) and no specific platform was requested
---> Running in b8193202ee5a

What does this mean? Is my workflow file misconfigured?

name: aarch64 build
on:
  workflow_dispatch:
jobs:
  aarch64:
    runs-on: ubuntu-latest
    steps:
    - uses: actions/checkout@v3

    - name: Build + Create tarball
      uses: uraimo/run-on-arch-action@v2
      with:
        arch: aarch64
        distro: ubuntu_latest
        githubToken: ${{ github.token }}
        setup: |
          mkdir -p ${PWD}/artifacts
        dockerRunArgs: |
          --volume "${PWD}/artifacts:/artifacts"
        install: |
          apt-get update -q -y
          apt-get install -q -y g++ cmake ninja-build curl
        run: |
          ...

Thanks!

uraimo commented 1 year ago

Hi, ignore the warning, that's the result of the architecture not being explicitly declared for those default distros. It's really just a warning, the emulation layer will start it correctly.