Added matrix build for multiple python versions
All checks were successful
/ build-python-${{ matrix.python-version }} (3.9) (push) Successful in 1m25s
/ build-python-${{ matrix.python-version }} (3.12) (push) Successful in 1m15s
/ build-python-${{ matrix.python-version }} (3.11) (push) Successful in 1m23s
/ build-python-${{ matrix.python-version }} (3.10) (push) Successful in 2m23s
/ release (push) Successful in 8s

This commit is contained in:
Firq 2024-07-22 18:16:13 +02:00
parent 78549910fa
commit 8da3105ab9
Signed by: Firq
GPG key ID: 3ACC61C8CEC83C20
3 changed files with 21 additions and 5 deletions

View file

@ -1,11 +1,19 @@
on:
push:
tags:
- '[0-9]+\.[0-9]+'
branches:
- 'main'
paths:
- '.forgejo/workflows/*'
- 'Dockerfile'
- 'pip.conf'
jobs:
build:
runs-on: dind
strategy:
matrix:
python-version: [ '3.9', '3.10', '3.11', '3.12' ]
name: build-python-${{ matrix.python-version }}
steps:
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
@ -19,7 +27,9 @@ jobs:
uses: docker/build-push-action@v5
with:
push: true
tags: forgejo.neshweb.net/ci-docker-images/python-neshweb:${{ github.ref_name }}
build-args: |
PYTHON_VERSION=${{ matrix.python-version }}
tags: forgejo.neshweb.net/ci-docker-images/python-neshweb:${{ matrix.python-version }}
release:
needs: [ build ]

View file

@ -1,4 +1,6 @@
FROM nikolaik/python-nodejs:python3.11-nodejs21-alpine
ARG PYTHON_VERSION=3.12
FROM nikolaik/python-nodejs:python${PYTHON_VERSION}-nodejs22-alpine
RUN apk -U upgrade && apk add --no-cache git openssh
COPY pip.conf /etc/pip.conf

View file

@ -1,3 +1,7 @@
# python-neshweb
A Python 3.11 and NodeJS 21 container preconfigured with the correct settings to pull from PyPi indexes on Neshweb
A python container bundled with NodeJS 22 based on an alpine image.
Build in a matrix for Python 3.10, 3.11 and 3.12
Comes bundled with git and OpenSSH installed as well