Skip to content

Commit fab8bd5

Browse files
CI: Parameterize python version in test-installation
The python version used in the test-installation Dockerfile was hardcoded and we ended up with a couple of similar Dockerfiles for different python versions. Ideally we should keep a single Dockerfile to use different python versions. Signed-off-by: Daniel Zullo <[email protected]>
1 parent fee6637 commit fab8bd5

File tree

3 files changed

+6
-19
lines changed

3 files changed

+6
-19
lines changed

.github/containers/test-installation/python-3.11.Dockerfile renamed to .github/containers/test-installation/Dockerfile

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,9 @@
33
# This Dockerfile is used to test the installation of the python package in
44
# multiple platforms in the CI. It is not used to build the package itself.
55

6-
FROM --platform=${TARGETPLATFORM} python:3.11-slim
6+
ARG PYTHON_VERSION="3.11"
7+
8+
FROM --platform=${TARGETPLATFORM} python:${PYTHON_VERSION}-slim
79

810
RUN apt-get update -y && \
911
apt-get install --no-install-recommends -y \

.github/containers/test-installation/python-3.12.Dockerfile

Lines changed: 0 additions & 17 deletions
This file was deleted.

.github/workflows/ci.yaml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -274,8 +274,10 @@ jobs:
274274
uses: docker/build-push-action@v5
275275
with:
276276
context: .
277-
file: .github/containers/test-installation/python-${{ matrix.python }}.Dockerfile
277+
file: .github/containers/test-installation/Dockerfile
278278
platforms: linux/amd64,linux/arm64
279+
build-args: |
280+
PYTHON_VERSION=${{ matrix.python }}
279281
tags: localhost/test-installation
280282
push: false
281283

0 commit comments

Comments
 (0)