update images
All checks were successful
pull request / build-py38 (push) Successful in 5m13s
pull request / build-py39 (push) Successful in 5m26s
pull request / build-py310 (push) Successful in 5m26s
pull request / build-py311 (push) Successful in 6m6s

Signed-off-by: Ivan Schaller <ivan@schaller.sh>
This commit is contained in:
Ivan Schaller 2023-09-04 23:26:09 +02:00
parent 7a0359fc5a
commit f4e2bb002a
6 changed files with 299 additions and 54 deletions

View file

@ -0,0 +1,234 @@
name: pull request
on:
push:
tags:
- "v*.*.*"
env:
REGISTRY: git.44net.ch
jobs:
build-py38:
runs-on: ubuntu-latest
env:
IMAGE_NAME: actions/runner-python38
steps:
- name: checkout code
uses: actions/checkout@v3
- name: setup qemu
uses: docker/setup-qemu-action@v2
- name: setup docker buildx
uses: docker/setup-buildx-action@v2
- name: get container metadata
uses: docker/metadata-action@v4
id: metadata
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
flavor: |
latest=auto
prefix=
suffix=
tags: |
type=schedule
type=ref,event=branch
type=ref,event=pr
type=semver,pattern={{version}}
type=semver,pattern={{major}}.{{minor}}
type=semver,pattern={{major}}
type=sha
- name: login to container registry
uses: docker/login-action@v2
if: gitea.event_name != 'pull_request'
with:
registry: ${{ env.REGISTRY }}
username: ${{ secrets.CR_USERNAME }}
password: ${{ secrets.CR_PASSWORD }}
- name: build and push docker image @amd64+arm64
uses: docker/build-push-action@v4
with:
push: ${{ gitea.event_name != 'pull_request' }}
platforms: |
linux/amd64
linux/arm64
context: .
file: Dockerfile.py38
provenance: false
tags: ${{ steps.metadata.outputs.tags }}
labels: ${{ steps.metadata.outputs.labels }}
build-args: |
BUILD_VERSION=${{ steps.metadata.outputs.version }}
BUILD_COMMIT=${{ gitea.sha }}
build-py39:
runs-on: ubuntu-latest
env:
IMAGE_NAME: actions/runner-python39
steps:
- name: checkout code
uses: actions/checkout@v3
- name: setup qemu
uses: docker/setup-qemu-action@v2
- name: setup docker buildx
uses: docker/setup-buildx-action@v2
- name: get container metadata
uses: docker/metadata-action@v4
id: metadata
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
flavor: |
latest=auto
prefix=
suffix=
tags: |
type=schedule
type=ref,event=branch
type=ref,event=pr
type=semver,pattern={{version}}
type=semver,pattern={{major}}.{{minor}}
type=semver,pattern={{major}}
type=sha
- name: login to container registry
uses: docker/login-action@v2
if: gitea.event_name != 'pull_request'
with:
registry: ${{ env.REGISTRY }}
username: ${{ secrets.CR_USERNAME }}
password: ${{ secrets.CR_PASSWORD }}
- name: build and push docker image @amd64+arm64
uses: docker/build-push-action@v4
with:
push: ${{ gitea.event_name != 'pull_request' }}
platforms: |
linux/amd64
linux/arm64
context: .
file: Dockerfile.py39
provenance: false
tags: ${{ steps.metadata.outputs.tags }}
labels: ${{ steps.metadata.outputs.labels }}
build-args: |
BUILD_VERSION=${{ steps.metadata.outputs.version }}
BUILD_COMMIT=${{ gitea.sha }}
build-py310:
runs-on: ubuntu-latest
env:
IMAGE_NAME: actions/runner-python310
steps:
- name: checkout code
uses: actions/checkout@v3
- name: setup qemu
uses: docker/setup-qemu-action@v2
- name: setup docker buildx
uses: docker/setup-buildx-action@v2
- name: get container metadata
uses: docker/metadata-action@v4
id: metadata
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
flavor: |
latest=auto
prefix=
suffix=
tags: |
type=schedule
type=ref,event=branch
type=ref,event=pr
type=semver,pattern={{version}}
type=semver,pattern={{major}}.{{minor}}
type=semver,pattern={{major}}
type=sha
- name: login to container registry
uses: docker/login-action@v2
if: gitea.event_name != 'pull_request'
with:
registry: ${{ env.REGISTRY }}
username: ${{ secrets.CR_USERNAME }}
password: ${{ secrets.CR_PASSWORD }}
- name: build and push docker image @amd64+arm64
uses: docker/build-push-action@v4
with:
push: ${{ gitea.event_name != 'pull_request' }}
platforms: |
linux/amd64
linux/arm64
context: .
file: Dockerfile.py310
provenance: false
tags: ${{ steps.metadata.outputs.tags }}
labels: ${{ steps.metadata.outputs.labels }}
build-args: |
BUILD_VERSION=${{ steps.metadata.outputs.version }}
BUILD_COMMIT=${{ gitea.sha }}
build-py311:
runs-on: ubuntu-latest
env:
IMAGE_NAME: actions/runner-python311
steps:
- name: checkout code
uses: actions/checkout@v3
- name: setup qemu
uses: docker/setup-qemu-action@v2
- name: setup docker buildx
uses: docker/setup-buildx-action@v2
- name: get container metadata
uses: docker/metadata-action@v4
id: metadata
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
flavor: |
latest=auto
prefix=
suffix=
tags: |
type=schedule
type=ref,event=branch
type=ref,event=pr
type=semver,pattern={{version}}
type=semver,pattern={{major}}.{{minor}}
type=semver,pattern={{major}}
type=sha
- name: login to container registry
uses: docker/login-action@v2
if: gitea.event_name != 'pull_request'
with:
registry: ${{ env.REGISTRY }}
username: ${{ secrets.CR_USERNAME }}
password: ${{ secrets.CR_PASSWORD }}
- name: build and push docker image @amd64+arm64
uses: docker/build-push-action@v4
with:
push: ${{ gitea.event_name != 'pull_request' }}
platforms: |
linux/amd64
linux/arm64
context: .
file: Dockerfile.py311
provenance: false
tags: ${{ steps.metadata.outputs.tags }}
labels: ${{ steps.metadata.outputs.labels }}
build-args: |
BUILD_VERSION=${{ steps.metadata.outputs.version }}
BUILD_COMMIT=${{ gitea.sha }}

View file

@ -1,11 +1,6 @@
name: build docker container
run-name: ${{ gitea.actor }}
name: tag
on:
push:
tags:
- "v*.*.*"
pull_request:
branches: [main, master]

View file

@ -1,28 +1,32 @@
FROM catthehacker/ubuntu:runner-22.04-20230729
FROM catthehacker/ubuntu:runner-22.04
ENV PYVERSION="3.10"
ENV PATH /home/runner/.local/bin:${PATH}
USER root
RUN \
echo "*** installing python ${PYVERSION} ***" \
&& sudo apt install -y software-properties-common wget \
&& sudo add-apt-repository -y ppa:deadsnakes/ppa \
&& sudo apt update \
&& sudo apt remove -y python* \
&& sudo apt install -y "python${PYVERSION}" "python${PYVERSION}-full" "python${PYVERSION}-dev" \
&& sudo ln -s -f /usr/bin/python${PYVERSION} /usr/bin/python \
&& sudo ln -s -f /usr/bin/python${PYVERSION} /usr/bin/python3 \
&& apt install -y software-properties-common wget \
&& add-apt-repository -y ppa:deadsnakes/ppa \
&& apt update \
&& apt remove -y python* \
&& apt install -y "python${PYVERSION}" "python${PYVERSION}-full" "python${PYVERSION}-dev" \
&& ln -s -f /usr/bin/python${PYVERSION} /usr/bin/python \
&& ln -s -f /usr/bin/python${PYVERSION} /usr/bin/python3 \
&& wget -q https://bootstrap.pypa.io/get-pip.py \
&& sudo python3 get-pip.py \
&& python3 get-pip.py \
&& python3 -m pip install --upgrade pip wheel setuptools
# cleanup installation
RUN \
echo "**** cleanup ****" \
&& sudo apt-get purge --auto-remove -y \
&& sudo apt-get clean \
&& sudo rm -rf \
&& apt-get purge --auto-remove -y \
&& apt-get clean \
&& rm -rf \
/tmp/* \
/var/lib/apt/lists/* \
/var/tmp/*
USER runner

View file

@ -1,28 +1,32 @@
FROM catthehacker/ubuntu:runner-22.04-20230729
FROM catthehacker/ubuntu:runner-22.04
ENV PYVERSION="3.11"
ENV PATH /home/runner/.local/bin:${PATH}
USER root
RUN \
echo "*** installing python ${PYVERSION} ***" \
&& sudo apt install -y software-properties-common wget \
&& sudo add-apt-repository -y ppa:deadsnakes/ppa \
&& sudo apt update \
&& sudo apt remove -y python* \
&& sudo apt install -y "python${PYVERSION}" "python${PYVERSION}-full" "python${PYVERSION}-dev" \
&& sudo ln -s -f /usr/bin/python${PYVERSION} /usr/bin/python \
&& sudo ln -s -f /usr/bin/python${PYVERSION} /usr/bin/python3 \
&& apt install -y software-properties-common wget \
&& add-apt-repository -y ppa:deadsnakes/ppa \
&& apt update \
&& apt remove -y python* \
&& apt install -y "python${PYVERSION}" "python${PYVERSION}-full" "python${PYVERSION}-dev" \
&& ln -s -f /usr/bin/python${PYVERSION} /usr/bin/python \
&& ln -s -f /usr/bin/python${PYVERSION} /usr/bin/python3 \
&& wget -q https://bootstrap.pypa.io/get-pip.py \
&& sudo python3 get-pip.py \
&& python3 get-pip.py \
&& python3 -m pip install --upgrade pip wheel setuptools
# cleanup installation
RUN \
echo "**** cleanup ****" \
&& sudo apt-get purge --auto-remove -y \
&& sudo apt-get clean \
&& sudo rm -rf \
&& apt-get purge --auto-remove -y \
&& apt-get clean \
&& rm -rf \
/tmp/* \
/var/lib/apt/lists/* \
/var/tmp/*
USER runner

View file

@ -1,28 +1,32 @@
FROM catthehacker/ubuntu:runner-22.04-20230729
FROM catthehacker/ubuntu:runner-22.04
ENV PYVERSION="3.8"
ENV PATH /home/runner/.local/bin:${PATH}
USER root
RUN \
echo "*** installing python ${PYVERSION} ***" \
&& sudo apt install -y software-properties-common wget \
&& sudo add-apt-repository -y ppa:deadsnakes/ppa \
&& sudo apt update \
&& sudo apt remove -y python* \
&& sudo apt install -y "python${PYVERSION}" "python${PYVERSION}-full" "python${PYVERSION}-dev" \
&& sudo ln -s -f /usr/bin/python${PYVERSION} /usr/bin/python \
&& sudo ln -s -f /usr/bin/python${PYVERSION} /usr/bin/python3 \
&& apt install -y software-properties-common wget \
&& add-apt-repository -y ppa:deadsnakes/ppa \
&& apt update \
&& apt remove -y python* \
&& apt install -y "python${PYVERSION}" "python${PYVERSION}-full" "python${PYVERSION}-dev" \
&& ln -s -f /usr/bin/python${PYVERSION} /usr/bin/python \
&& ln -s -f /usr/bin/python${PYVERSION} /usr/bin/python3 \
&& wget -q https://bootstrap.pypa.io/get-pip.py \
&& sudo python3 get-pip.py \
&& python3 get-pip.py \
&& python3 -m pip install --upgrade pip wheel setuptools
# cleanup installation
RUN \
echo "**** cleanup ****" \
&& sudo apt-get purge --auto-remove -y \
&& sudo apt-get clean \
&& sudo rm -rf \
&& apt-get purge --auto-remove -y \
&& apt-get clean \
&& rm -rf \
/tmp/* \
/var/lib/apt/lists/* \
/var/tmp/*
USER runner

View file

@ -1,28 +1,32 @@
FROM catthehacker/ubuntu:runner-22.04-20230729
FROM catthehacker/ubuntu:runner-22.04
ENV PYVERSION="3.9"
ENV PATH /home/runner/.local/bin:${PATH}
USER root
RUN \
echo "*** installing python ${PYVERSION} ***" \
&& sudo apt install -y software-properties-common wget \
&& sudo add-apt-repository -y ppa:deadsnakes/ppa \
&& sudo apt update \
&& sudo apt remove -y python* \
&& sudo apt install -y "python${PYVERSION}" "python${PYVERSION}-full" "python${PYVERSION}-dev" \
&& sudo ln -s -f /usr/bin/python${PYVERSION} /usr/bin/python \
&& sudo ln -s -f /usr/bin/python${PYVERSION} /usr/bin/python3 \
&& apt install -y software-properties-common wget \
&& add-apt-repository -y ppa:deadsnakes/ppa \
&& apt update \
&& apt remove -y python* \
&& apt install -y "python${PYVERSION}" "python${PYVERSION}-full" "python${PYVERSION}-dev" \
&& ln -s -f /usr/bin/python${PYVERSION} /usr/bin/python \
&& ln -s -f /usr/bin/python${PYVERSION} /usr/bin/python3 \
&& wget -q https://bootstrap.pypa.io/get-pip.py \
&& sudo python3 get-pip.py \
&& python3 get-pip.py \
&& python3 -m pip install --upgrade pip wheel setuptools
# cleanup installation
RUN \
echo "**** cleanup ****" \
&& sudo apt-get purge --auto-remove -y \
&& sudo apt-get clean \
&& sudo rm -rf \
&& apt-get purge --auto-remove -y \
&& apt-get clean \
&& rm -rf \
/tmp/* \
/var/lib/apt/lists/* \
/var/tmp/*
USER runner