@@ -78,59 +78,55 @@ jobs:
7878 python_wheels :
7979 needs : build_and_test_python
8080 runs-on : ubuntu-latest
81- container :
82- image : quay.io/pypa/manylinux_2_28:latest
8381 env :
8482 PY_VER : ${{ matrix.python-version }}
8583 BASE_IMAGE : quay.io/pypa/manylinux_2_28:latest
84+ GHCR_REPO : ghcr.io/${{ github.repository_owner }}/${{ github.event.repository.name }}
8685 environment :
8786 name : pypi
8887 url : https://pypi.org/p/asyncproxy
8988 permissions :
9089 id-token : write
91- continue-on-error : true
9290 strategy :
91+ continue-on-error : true
9392 matrix :
9493 python-version : ['3.9', '3.11', '3.12']
9594 steps :
96- - name : Install git
97- run : |
98- yum install -y git redhat-lsb-core gnupg2 wget ca-certificates yum-utils jq
99- yum-config-manager --add-repo https://download.docker.com/linux/centos/docker-ce.repo
100- yum install -y docker-ce-cli
95+ - name : Set up Python ${{ env.PY_VER }}
96+ uses : actions/setup-python@v5
97+ with :
98+ python-version : ${{ env.PY_VER }}
10199
102100 - uses : actions/checkout@v4
103101
104- - name : Set up Python
105- run : sh -x scipts/build/install_depends_yum.sh
106-
107- - name : Install dependencies
108- run : sh -x scipts/build/install_depends_wheels.sh
109-
110102 - name : Set up QEMU
111103 uses : docker/setup-qemu-action@v3
112104
105+ - name : Set up Docker Buildx
106+ uses : docker/setup-buildx-action@v3
107+
113108 - name : Set dynamic environment
114109 id : set-env
115110 run : |
116111 PLATFORMS="`docker manifest inspect ${{ env.BASE_IMAGE }} | \
117112 jq -r '.manifests[] | "\(.platform.os)/\(.platform.architecture)\(if .platform.variant != null then "/\(.platform.variant)" else "" end)"' | \
118113 sort -u | grep -v unknown | paste -sd ','`"
119- BUILD_MATRIX="`echo ${PLATFORMS} | tr ',' '\n' | jq -R . | jq -s . | tr '\n' ' '`"
120- GIT_BRANCH="${GITHUB_HEAD_REF:-${GITHUB_REF#refs/heads/}}"
121- GIT_BRANCH="${GIT_BRANCH#refs/tags/}"
122- BUILD_IMAGE="${{ inputs.ghcr-repo }}:rtp.io-${{ inputs.rtpp-tag }}-${GIT_BRANCH}"
123114 echo "Platforms: ${PLATFORMS}"
124- echo "platforms=${PLATFORMS}" >> $GITHUB_OUTPUT
125- echo "build-matrix=${BUILD_MATRIX}" >> $GITHUB_OUTPUT
126- echo "build-image=${BUILD_IMAGE}" >> $GITHUB_OUTPUT
127- echo "git-branch=${GIT_BRANCH}" >> $GITHUB_OUTPUT
115+ echo "PLATFORMS=${PLATFORMS}" >> $GITHUB_ENV
128116
129- - name : build
130- run : |
131- python${PY_VER} setup.py build sdist
132- python${PY_VER} -m build --wheel
133- auditwheel repair dist/*.whl --wheel-dir dist/
117+ - name : Show context tree
118+ run : ls -R .
119+
120+ - name : Build Docker image
121+ uses : docker/build-push-action@v6
122+ with :
123+ context : .
124+ file : ./docker/Dockerfile.python_wheels
125+ build-args : |
126+ BASE_IMAGE=${{ env.BASE_IMAGE }}
127+ PY_VER=${{ env.PY_VER }}
128+ platforms : ${{ env.PLATFORMS }}
129+ push : false
134130
135131 - name : Publish package distributions to PyPI
136132 if : github.event_name == 'release' && github.event.action == 'created'
0 commit comments