ci: set correct arch for rootfs tests
authorPaul Spooren <[email protected]>
Thu, 14 Mar 2024 13:46:15 +0000 (14:46 +0100)
committerPaul Spooren <[email protected]>
Fri, 15 Mar 2024 10:36:28 +0000 (11:36 +0100)
With the commit 01e5cfc "CI: Add target/arch tags (no suffix) for
snapshot images"[1] the os/platform is set for all images, which is usually
different from what the GitHub action runner uses (x86). The Docker
deamon still tries to fetch the x86 version and fails.

This commit explicitly sets the fitting arch.

[1]: https://github.com/openwrt/docker/commit/01e5cfccd73a72ecab730496607c7c22b904f366

Signed-off-by: Paul Spooren <[email protected]>
.github/workflows/multi-arch-test-build.yml

index 00c59164ff01d7374e949c4d07fc42764308e905..128e2b93acc828f0e7627d3e38e2021490ced9dc 100644 (file)
@@ -196,11 +196,11 @@ jobs:
       - name: Build Docker container
         if: ${{ matrix.runtime_test && fromJSON(env.HAVE_IPKS) }}
         run: |
-          docker build -t test-container --build-arg ARCH .github/workflows/
+          docker build --platform linux/${{ matrix.arch }} -t test-container --build-arg ARCH .github/workflows/
         env:
           ARCH: ${{ matrix.arch }}-${{ env.BRANCH }}
 
       - name: Test via Docker container
         if: ${{ matrix.runtime_test && fromJSON(env.HAVE_IPKS) }}
         run: |
-          docker run --rm -v $GITHUB_WORKSPACE:/ci test-container
+          docker run --platform linux/${{ matrix.arch }} --rm -v $GITHUB_WORKSPACE:/ci test-container