diff --git a/.github/scripts/matrix.sh b/.github/scripts/matrix.sh index 1835ed3..c261dc9 100755 --- a/.github/scripts/matrix.sh +++ b/.github/scripts/matrix.sh @@ -86,9 +86,11 @@ for arch in "${!PLATFORMS[@]}"; do jq -n -c \ --arg platforms "${PLATFORMS[$arch]}" \ + --arg test_platform "${PLATFORMS[$arch]%%,*}" \ --arg raspios_url "$raspios_url" \ --arg raspios_sha256 "$raspios_sha256" \ --arg tags "$tags" \ - '{platforms: $platforms, raspios_url: $raspios_url, raspios_sha256: $raspios_sha256, tags: $tags}' + --arg test_tag "${tags%%,*}" \ + '{platforms: $platforms, test_platform: $test_platform, raspios_url: $raspios_url, raspios_sha256: $raspios_sha256, tags: $tags, test_tag: $test_tag}' done done | jq -sc '{include: .}' diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml index 1a03af7..1e6cdbd 100644 --- a/.github/workflows/docker.yml +++ b/.github/workflows/docker.yml @@ -64,6 +64,17 @@ jobs: uses: docker/setup-qemu-action@v4 - name: Set up Docker Buildx uses: docker/setup-buildx-action@v4 + - name: Build test image + uses: docker/build-push-action@v7 + with: + load: true + tags: ${{ matrix.test_tag }} + platforms: ${{ matrix.test_platform }} + build-args: | + RASPIOS_URL=${{ matrix.raspios_url }} + RASPIOS_SHA256=${{ matrix.raspios_sha256 }} + - name: Test + run: docker run --rm --platform ${{ matrix.test_platform }} ${{ matrix.test_tag }} grep -qiE "raspbian|debian" /etc/os-release - name: Build and push uses: docker/build-push-action@v7 with: