Move CI container creation to kiwix/container-images

This commit is contained in:
Emmanuel Engelhart 2023-10-29 11:57:59 +01:00
parent 8c5db8b221
commit 0f0f7c5003
No known key found for this signature in database
GPG Key ID: 120B30D020B553D3
5 changed files with 0 additions and 160 deletions

View File

@ -1,43 +0,0 @@
name: Container images CD
on:
push:
paths:
- 'ci_images/**'
release:
types: [published]
env:
IMAGE_PREFIX: ghcr.io/kiwix/kiwix-build_ci_
jobs:
Container:
strategy:
fail-fast: false
matrix:
variant: [f35, focal, bionic, alpine]
runs-on: ubuntu-22.04
steps:
- name: Retrieve the code
uses: actions/checkout@v3
- name: Setup container image name
id: env
run: |
echo "IMAGE_NAME=${{ env.IMAGE_PREFIX }}${{ matrix.variant }}" >> $GITHUB_OUTPUT
- name: Build container image
run: |
docker build -t ${{ steps.env.outputs.IMAGE_NAME }}:dev - < ci_images/${{ matrix.variant }}_builder.dockerfile
- name: Tag release container image
if: github.event.action == 'published'
run: |
docker tag ${{ steps.env.outputs.IMAGE_NAME }}:dev ${{ steps.env.outputs.IMAGE_NAME }}:$GITHUB_REF_NAME
docker tag ${{ steps.env.outputs.IMAGE_NAME }}:dev ${{ steps.env.outputs.IMAGE_NAME }}:latest
- name: Upload container image
run: |
echo "${{ secrets.GHCR_TOKEN }}" | docker login ghcr.io -u "${{ secrets.GHCR_USERNAME }}" --password-stdin
docker push --all-tags ${{ steps.env.outputs.IMAGE_NAME }}

View File

@ -1,23 +0,0 @@
FROM alpine:3.16
ENV LANG C.UTF-8
ENV OS_NAME alpine
RUN apk update -q \
&& apk add -q --no-cache \
# Base build tools
bash build-base git py3-pip \
# Packaged dependencies
xz-dev \
zstd-dev \
xapian-core-dev \
icu-dev icu-data-full \
gtest-dev
# Create user
RUN addgroup --gid 121 runner
RUN adduser -u 1001 -G runner -h /home/runner -D runner
USER runner
ENV PATH /home/runner/.local/bin:$PATH
RUN pip3 install meson ninja ; \
ln -s /usr/bin/python3 /home/runner/.local/bin/python

View File

@ -1,26 +0,0 @@
FROM ubuntu:bionic
ENV LANG C.UTF-8
ENV OS_NAME bionic
RUN apt update -q \
&& apt-get update \
&& apt install -q -y --no-install-recommends \
# Base build tools
build-essential automake libtool cmake ccache pkg-config autopoint patch \
python3-pip python3-setuptools python3-wheel git subversion wget unzip \
ninja-build openssh-client curl \
# Packaged dependencies
libbz2-dev uuid-dev zlib1g-dev \
libgtest-dev \
# Other tools (to remove)
# vim less grep \
&& apt-get clean -y \
&& rm -rf /var/lib/apt/lists/* /usr/share/doc/* /var/cache/debconf/* \
&& pip3 install meson pytest gcovr requests distro
# Create user
RUN groupadd --gid 121 runner
RUN useradd --uid 1001 --gid 121 --create-home runner
USER runner
ENV PATH /home/runner/.local/bin:$PATH

View File

@ -1,28 +0,0 @@
FROM fedora:35
ENV LANG C.UTF-8
ENV OS_NAME f35
RUN dnf install -y --nodocs \
# Base build tools
make automake libtool cmake git-core subversion pkg-config gcc-c++ \
wget unzip ninja-build ccache which patch gcovr xz openssh-clients \
python3-pip \
# Cross win32 compiler
mingw32-gcc-c++ mingw32-bzip2-static mingw32-win-iconv-static \
mingw32-winpthreads-static mingw32-zlib-static mingw32-xz-libs-static \
mingw32-libmicrohttpd \
# python3
python3-pip python-unversioned-command \
# Other tools (to remove)
# vim less grep
&& dnf remove -y "*-doc" \
&& dnf autoremove -y \
&& dnf clean all \
&& pip3 install meson pytest requests distro
# Create user
RUN groupadd --gid 121 runner
RUN useradd --uid 1001 --gid 121 --create-home runner
USER runner
ENV PATH /home/runner/.local/bin:$PATH

View File

@ -1,40 +0,0 @@
FROM ubuntu:focal
ENV LANG C.UTF-8
ENV OS_NAME focal
ENV DEBIAN_FRONTEND noninteractive
RUN apt update -q \
&& apt install -q -y --no-install-recommends \
# Base build tools
build-essential automake libtool cmake ccache pkg-config autopoint patch \
python3-pip python3-setuptools python3-wheel git subversion wget unzip \
ninja-build openssh-client curl libgl-dev \
# Python (2) is needed to install android-ndk
python \
# Packaged dependencies
libbz2-dev libmagic-dev uuid-dev zlib1g-dev \
libmicrohttpd-dev aria2 libgtest-dev libgl-dev \
# Devel package to compile python modules
libxml2-dev libxslt-dev python3-dev \
# Qt packages
libqt5gui5 qtbase5-dev qtwebengine5-dev libqt5svg5-dev qt5-image-formats-plugins qt5-default \
# To create the appimage of kiwix-desktop
libfuse2 fuse patchelf \
# Flatpak tools
elfutils flatpak flatpak-builder \
# Cross win32 compiler
g++-mingw-w64-i686 gcc-mingw-w64-i686 gcc-mingw-w64-base mingw-w64-tools \
# Cross compile i586
libc6-dev-i386 lib32stdc++6 gcc-multilib g++-multilib \
# Other tools (to remove)
# vim less grep \
&& apt-get clean -y \
&& rm -rf /var/lib/apt/lists/* /usr/share/doc/* /var/cache/debconf/* \
&& pip3 install meson pytest gcovr requests distro
# Create user
RUN groupadd --gid 121 runner
RUN useradd --uid 1001 --gid 121 --create-home runner
USER runner
ENV PATH /home/runner/.local/bin:$PATH