Skip to content

Commit

Permalink
use docker platform tags
Browse files Browse the repository at this point in the history
  • Loading branch information
bjia56 authored Nov 20, 2024
1 parent 1ed0794 commit 811c426
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion .github/workflows/build_python.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ env:
VERBOSE_CI: ${{ inputs.verbose }}
PORTABLE_PYTHON_BUILDSYSTEM_BRANCH: ${{ inputs.buildsystem_branch || 'portable-python' }}
image_map: '{"x86_64": "amd64/ubuntu:18.04", "i386": "i386/ubuntu:18.04", "aarch64": "arm64v8/ubuntu:18.04", "arm": "arm32v7/debian:bullseye", "riscv64": "riscv64/debian:sid", "loongarch64": "loongarch64/debian:sid", "s390x": "s390x/debian:bullseye"}'
platform_map: '{"x86_64": "linux/amd64", "i386": "linux/386", "aarch64": "linux/arm64/v8", "arm": "linux/arm/v7", "riscv64": "linux/riscv64", "loongarch64": "linux/loong64", "s390x": "linux/s390x"}'
freebsd_release_map: '{"14": "14.0", "13": "13.2"}'

jobs:
Expand Down Expand Up @@ -81,6 +82,12 @@ jobs:
IMAGE=$(echo ${{ toJSON(env.image_map) }} | jq -r '.["${{ matrix.arch }}"]')
echo "image=$IMAGE" >> "$GITHUB_OUTPUT"
- name: Parse platform
id: parse_platform
run: |
PLATFORM=$(echo ${{ toJSON(env.platform_map) }} | jq -r '.["${{ matrix.arch }}"]')
echo "platform=$PLATFORM" >> "$GITHUB_OUTPUT"
- name: Set up zig
uses: mlugg/setup-zig@v1
with:
Expand Down Expand Up @@ -114,7 +121,7 @@ jobs:
uses: addnab/docker-run-action@v3
with:
image: ${{ steps.parse_image.outputs.image }}
options: -v ${{ github.workspace }}:/work --workdir /tmp
options: --platform ${{ steps.parse_platform.outputs.platform }} -v ${{ github.workspace }}:/work --workdir /tmp
shell: bash
run: |
set -e
Expand Down

0 comments on commit 811c426

Please sign in to comment.