├── .github ├── dependabot.yml └── workflows │ ├── package.yml │ └── qt5_6.yml ├── README.md ├── fedora ├── debian-armv6 └── ubuntu_debian /.github/dependabot.yml: -------------------------------------------------------------------------------- 1 | version: 2 2 | updates: 3 | 4 | - package-ecosystem: "github-actions" 5 | directory: "/" 6 | schedule: 7 | interval: "monthly" 8 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Docker Hyperion compilation 2 | [![Docker CI](https://github.com/Hyperion-Project/hyperion.docker-ci/workflows/Docker%20CI/badge.svg)](https://github.com/orgs/hyperion-project/packages)
3 | Provides multi platform images to compile Hyperion inside a Docker container.
4 | Images are available at https://github.com/orgs/hyperion-project/packages -------------------------------------------------------------------------------- /fedora: -------------------------------------------------------------------------------- 1 | ARG DIST="fedora" 2 | ARG SUITE="39" 3 | ARG QT_VERSION="6" 4 | ARG REPOSITORY="https://github.com/hyperion-project" 5 | ARG CMAKE_VERSION="3.28.3" 6 | 7 | FROM ${DIST}:${SUITE} 8 | 9 | ARG DIST 10 | ARG SUITE 11 | ARG QT_VERSION 12 | ARG REPOSITORY 13 | ARG CMAKE_VERSION 14 | ARG TARGETPLATFORM 15 | 16 | ENV QEMU_EXECVE=1 17 | ENV TARGETPLATFORM=${TARGETPLATFORM:-linux/amd64} 18 | 19 | # update 20 | RUN dnf -y update 21 | 22 | # install qt5 or qt6 23 | RUN if [ "$QT_VERSION" = "6" ]; then \ 24 | dnf -y install qt6-qtbase-devel qt6-qtserialport-devel qt6-qtwebsockets-devel libxkbcommon-devel; \ 25 | else \ 26 | dnf -y install qt5-qtbase-devel qt5-qtserialport-devel qt5-qtwebsockets-devel qt5-qtx11extras-devel; \ 27 | fi 28 | 29 | # install general deps 30 | RUN dnf -y group install 'development-tools' 'c-development' 'rpm-development-tools' && \ 31 | dnf -y install \ 32 | ninja-build \ 33 | curl \ 34 | fedora-packager \ 35 | python3-devel \ 36 | libXrandr-devel \ 37 | xcb-util-image-devel \ 38 | turbojpeg-devel \ 39 | libjpeg-turbo-devel \ 40 | libusb1-devel \ 41 | avahi-libs \ 42 | avahi-compat-libdns_sd-devel \ 43 | xcb-util-devel \ 44 | dbus-devel \ 45 | protobuf-devel \ 46 | protobuf-compiler \ 47 | flatbuffers-devel \ 48 | flatbuffers-compiler \ 49 | mbedtls-devel \ 50 | openssl-devel \ 51 | libcec-devel \ 52 | alsa-lib-devel \ 53 | libftdi-devel \ 54 | systemd-devel \ 55 | libdrm-devel 56 | 57 | # Mark /source as safe directory for git (used in CI mounts) 58 | RUN git config --system --add safe.directory /source 59 | 60 | # Install CMake on amd64 and arm64 61 | ENV CMAKE_URL="https://github.com/Kitware/CMake/releases/download/v${CMAKE_VERSION}/cmake-${CMAKE_VERSION}" 62 | RUN if [ "$TARGETPLATFORM" = "linux/amd64" ]; then \ 63 | curl -OLs ${CMAKE_URL}-linux-x86_64.sh; \ 64 | chmod +x cmake-${CMAKE_VERSION}-linux-x86_64.sh; \ 65 | ./cmake-${CMAKE_VERSION}-linux-x86_64.sh --skip-license --prefix="/usr"; \ 66 | rm -rf cmake-${CMAKE_VERSION}-linux-x86_64.sh; \ 67 | elif [ "$TARGETPLATFORM" = "linux/arm64" ]; then \ 68 | curl -OLs ${CMAKE_URL}-linux-aarch64.sh; \ 69 | chmod +x cmake-${CMAKE_VERSION}-linux-aarch64.sh; \ 70 | ./cmake-${CMAKE_VERSION}-linux-aarch64.sh --skip-license --prefix="/usr"; \ 71 | rm -rf cmake-${CMAKE_VERSION}-linux-aarch64.sh; \ 72 | fi 73 | 74 | # Show cmake version 75 | RUN cmake --version 76 | 77 | # rpmdev-setuptree will create the ~/rpmbuild directory and a set of subdirectories (e.g. SPECS and BUILD) 78 | RUN rpmdev-setuptree 79 | 80 | # download qemu and set exec flag 81 | RUN if [ "$TARGETPLATFORM" = "linux/arm64" ]; then \ 82 | curl -kL https://github.com/balena-io/qemu/releases/download/v7.0.0%2Bbalena1/qemu-7.0.0.balena1-aarch64.tar.gz | tar zxvf - -C . --strip-components 1 && mv qemu-aarch64-static /usr/bin/qemu-static; \ 83 | else \ 84 | printf '#!/bin/bash\nexec "$@"' > /usr/bin/qemu-static; \ 85 | fi 86 | 87 | # set qemu exec flag 88 | RUN chmod +x /usr/bin/qemu-static 89 | 90 | # set entrypoint 91 | ENTRYPOINT [ "/usr/bin/qemu-static" ] 92 | -------------------------------------------------------------------------------- /debian-armv6: -------------------------------------------------------------------------------- 1 | ARG SUITE="bullseye" 2 | ARG QT_VERSION="6" 3 | ARG REPOSITORY="https://github.com/hyperion-project" 4 | ARG CMAKE_VERSION="3.28.3" 5 | 6 | FROM tianon/raspbian:${SUITE}-slim 7 | 8 | ARG SUITE 9 | ARG QT_VERSION 10 | ARG REPOSITORY 11 | ARG CMAKE_VERSION 12 | ARG DEBIAN_FRONTEND=noninteractive 13 | ARG TARGETPLATFORM 14 | 15 | ENV QEMU_EXECVE=1 16 | ENV TARGETPLATFORM=${TARGETPLATFORM:-linux/arm/v6} 17 | 18 | # update 19 | RUN apt-get update 20 | 21 | # adding raspberrypi repository 22 | RUN apt-get -y install --no-install-recommends ca-certificates curl gnupg; \ 23 | curl -fsSL http://archive.raspberrypi.org/debian/raspberrypi.gpg.key | gpg --dearmor -o /usr/share/keyrings/raspberrypi-archive-keyring.gpg; \ 24 | echo "deb [signed-by=/usr/share/keyrings/raspberrypi-archive-keyring.gpg] http://archive.raspberrypi.org/debian/ ${SUITE} main" > /etc/apt/sources.list.d/raspi.list; \ 25 | apt-get update 26 | 27 | # install qt5 or qt6 (qt6 is not available on debian buster/bullseye) 28 | RUN if [ "$SUITE" = "bookworm" ] || [ "$SUITE" = "trixie" ] && [ "$QT_VERSION" = "6" ]; then \ 29 | apt-get -y install qt6-base-dev libqt6sql6-sqlite qt6-serialport-dev qt6-websockets-dev libxkbcommon-dev libvulkan-dev libgl1-mesa-dev; \ 30 | else \ 31 | apt-get -y install qtbase5-dev libqt5serialport5-dev libqt5websockets5-dev libqt5sql5-sqlite libqt5svg5-dev; \ 32 | fi 33 | 34 | # install deps 35 | RUN apt-get -y install \ 36 | devscripts \ 37 | fakeroot \ 38 | debhelper \ 39 | libdistro-info-perl \ 40 | git \ 41 | python3-dev \ 42 | build-essential \ 43 | ninja-build \ 44 | libusb-1.0-0-dev \ 45 | libcec-dev \ 46 | libp8-platform-dev \ 47 | libudev-dev \ 48 | libavahi-core-dev \ 49 | libavahi-compat-libdnssd-dev \ 50 | zlib1g-dev \ 51 | libasound2-dev \ 52 | libjpeg-dev \ 53 | libturbojpeg0-dev \ 54 | libmbedtls-dev \ 55 | libftdi1-dev \ 56 | libssl-dev \ 57 | libglib2.0-dev \ 58 | libdrm-dev 59 | 60 | RUN if [ "$SUITE" != "trixie" ]; then \ 61 | apt-get -y install --no-install-recommends libraspberrypi-dev; \ 62 | fi 63 | 64 | # Mark /source as safe directory for git (used in CI mounts) 65 | RUN git config --system --add safe.directory /source 66 | 67 | # Compile and install CMake 68 | ENV CMAKE_URL="https://github.com/Kitware/CMake/releases/download/v${CMAKE_VERSION}/cmake-${CMAKE_VERSION}" 69 | RUN mkdir -p /tmp/cmake; \ 70 | cd /tmp/cmake; \ 71 | curl -kL ${CMAKE_URL}.tar.gz | tar zxf - -C . --strip-components 1; \ 72 | sed -i -e 's/|aarch64//g' Source/Checks/cm_cxx_features.cmake; \ 73 | ./bootstrap --prefix=/usr --parallel=`nproc`; \ 74 | make -j `nproc`; \ 75 | make install; \ 76 | cd && rm -rf /tmp/cmake 77 | 78 | # Show cmake version 79 | RUN cmake --version 80 | 81 | # download qemu and set exec flag 82 | RUN curl -kL https://github.com/balena-io/qemu/releases/download/v7.0.0%2Bbalena1/qemu-7.0.0.balena1-arm.tar.gz | tar zxvf - -C . --strip-components 1 && mv qemu-arm-static /usr/bin/qemu-static 83 | 84 | # set qemu exec flag 85 | RUN chmod +x /usr/bin/qemu-static 86 | 87 | # set entrypoint 88 | ENTRYPOINT [ "/usr/bin/qemu-static" ] 89 | -------------------------------------------------------------------------------- /.github/workflows/package.yml: -------------------------------------------------------------------------------- 1 | name: Package Repository 2 | run-name: | 3 | ${{ github.event_name == 'schedule' && '⏰ Scheduled build' || '' }} 4 | ${{ github.event_name == 'push' && format('🌱 Push build - {0}', github.event.head_commit.message) || '' }} 5 | 6 | on: 7 | schedule: 8 | - cron: '0 0 * * 0' 9 | push: 10 | branches: [ master ] 11 | 12 | jobs: 13 | 14 | ubuntu_debian_fedora: 15 | name: 🐧 ${{ matrix.os.description }} Qt ${{ matrix.qt_version }} 16 | strategy: 17 | fail-fast: false 18 | matrix: 19 | os: [ 20 | { distribution: ubuntu, codename: jammy, description: Ubuntu 22.04 LTS (Jammy Jellyfish), target_platform: "['amd64', 'arm64', 'armv7']" }, 21 | { distribution: ubuntu, codename: noble, description: Ubuntu 24.04 LTS (Noble Numbat), target_platform: "['amd64', 'arm64', 'armv7']" }, 22 | { distribution: ubuntu, codename: plucky, description: Ubuntu 25.04 (Plucky Puffin), target_platform: "['amd64', 'arm64', 'armv7']" }, 23 | { distribution: ubuntu, codename: questing, description: Ubuntu 25.10 (Questing Quokka), target_platform: "['amd64', 'arm64', 'armv7']" }, 24 | { distribution: ubuntu, codename: resolute, description: Ubuntu 26.04 LTS (Resolute Raccoon), target_platform: "['amd64', 'arm64', 'armv7']" }, 25 | { distribution: debian, codename: bullseye, description: Debian 11.x (Bullseye), target_platform: "['amd64', 'arm64', 'armv6', 'armv7']" }, 26 | { distribution: debian, codename: bookworm, description: Debian 12.x (Bookworm), target_platform: "['amd64', 'arm64', 'armv6', 'armv7']" }, 27 | { distribution: debian, codename: trixie, description: Debian 13.x (Trixie), target_platform: "['amd64', 'arm64', 'armv6', 'armv7']" }, 28 | { distribution: fedora, codename: 39, description: Fedora 39, target_platform: "['amd64', 'arm64']" }, 29 | { distribution: fedora, codename: 40, description: Fedora 40, target_platform: "['amd64', 'arm64']" }, 30 | { distribution: fedora, codename: 41, description: Fedora 41, target_platform: "['amd64', 'arm64']" }, 31 | { distribution: fedora, codename: 42, description: Fedora 42, target_platform: "['amd64', 'arm64']" }, 32 | { distribution: fedora, codename: 43, description: Fedora 43, target_platform: "['amd64', 'arm64']" } 33 | ] 34 | qt_version: [ 5, 6 ] 35 | # Qt6 on Debian Bullseye (only armv6) is excluded in reusable workflow qt5_6.yml because target_platform is passed as string to reusable workflow 36 | 37 | uses: ./.github/workflows/qt5_6.yml 38 | secrets: inherit 39 | with: 40 | distribution: ${{ matrix.os.distribution }} 41 | codename: ${{ matrix.os.codename }} 42 | qt_version: ${{ matrix.qt_version }} 43 | target_platform: ${{ matrix.os.target_platform }} 44 | 45 | cleanup: 46 | name: 🧹 Cleanup untagged images 47 | needs: ubuntu_debian_fedora 48 | if: ${{ needs.ubuntu_debian_fedora.result == 'success' }} 49 | env: 50 | SECRET_DOCKER_CI: ${{ secrets.DOCKER_CI }} 51 | runs-on: ubuntu-latest 52 | steps: 53 | - name: 🐳 Set up Docker Buildx 54 | uses: docker/setup-buildx-action@v3 55 | 56 | - name: 🔑 Login to GitHub Container Registry 57 | if: ${{ env.SECRET_DOCKER_CI != null }} 58 | uses: docker/login-action@v3 59 | with: 60 | registry: ghcr.io 61 | username: ${{ github.actor }} 62 | password: ${{ secrets.DOCKER_CI }} 63 | 64 | - name: 🧹 Cleanup 65 | if: ${{ env.SECRET_DOCKER_CI != null }} 66 | uses: dataaxiom/ghcr-cleanup-action@v1 67 | with: 68 | token: ${{ secrets.DOCKER_CI }} 69 | packages: "*" 70 | expand-packages: true 71 | delete-untagged: true 72 | delete-partial-images: true 73 | delete-orphaned-images: true 74 | validate: true -------------------------------------------------------------------------------- /ubuntu_debian: -------------------------------------------------------------------------------- 1 | ARG DIST="debian" 2 | ARG SUITE="bullseye" 3 | ARG QT_VERSION="6" 4 | ARG REPOSITORY="https://github.com/hyperion-project" 5 | ARG CMAKE_VERSION="3.28.3" 6 | ARG DEBIAN_FRONTEND=noninteractive 7 | 8 | FROM ${DIST}:${SUITE} 9 | 10 | ARG DIST 11 | ARG SUITE 12 | ARG QT_VERSION 13 | ARG REPOSITORY 14 | ARG CMAKE_VERSION 15 | ARG DEBIAN_FRONTEND 16 | ARG TARGETPLATFORM 17 | 18 | ENV QEMU_EXECVE=1 19 | ENV TARGETPLATFORM=${TARGETPLATFORM:-linux/amd64} 20 | ENV DEBFULLNAME="Hyperion Project" 21 | ENV DEBEMAIL="admin@hyperion-project.org" 22 | 23 | # update 24 | RUN apt-get update 25 | 26 | # install qt5 or qt6 (qt6 is not available on ubuntu focal and debian buster) 27 | # on debian bullseye add backports to install qt6 28 | RUN if [ "$SUITE" != "buster" ] && [ "$SUITE" != "focal" ] && [ "$QT_VERSION" = "6" ]; then \ 29 | if [ "$SUITE" = "bullseye" ]; then \ 30 | echo "deb http://archive.debian.org/debian bullseye-backports main contrib non-free" | tee -a /etc/apt/sources.list; \ 31 | apt-get update; \ 32 | fi; \ 33 | if [ "$SUITE" = "jammy" ]; then SERIALPORT="libqt6serialport6-dev"; else SERIALPORT="qt6-serialport-dev"; fi; \ 34 | if [ "$SUITE" = "jammy" ]; then WEBSOCKETS="libqt6websockets6-dev"; else WEBSOCKETS="qt6-websockets-dev"; fi; \ 35 | apt-get -y install qt6-base-dev $SERIALPORT $WEBSOCKETS libqt6sql6-sqlite libxkbcommon-dev libvulkan-dev libgl1-mesa-dev; \ 36 | else \ 37 | apt-get -y install qtbase5-dev libqt5serialport5-dev libqt5websockets5-dev libqt5sql5-sqlite libqt5svg5-dev; \ 38 | fi 39 | 40 | # install general deps (all platforms/arch/os) 41 | RUN apt-get -y install \ 42 | devscripts \ 43 | fakeroot \ 44 | debhelper \ 45 | libdistro-info-perl \ 46 | git \ 47 | curl \ 48 | python3-dev \ 49 | build-essential \ 50 | ninja-build \ 51 | libusb-1.0-0-dev \ 52 | libcec-dev \ 53 | libp8-platform-dev \ 54 | libudev-dev \ 55 | libavahi-core-dev \ 56 | libavahi-compat-libdnssd-dev \ 57 | zlib1g-dev \ 58 | libasound2-dev \ 59 | libjpeg-dev \ 60 | libturbojpeg0-dev \ 61 | libmbedtls-dev \ 62 | libftdi1-dev \ 63 | libssl-dev \ 64 | libglib2.0-dev \ 65 | libdrm-dev 66 | 67 | # Mark /source as safe directory for git (used in CI mounts) 68 | RUN git config --system --add safe.directory /source 69 | 70 | # install X11/XCB on Ubuntu for all arch and on Debian for amd64 71 | # install libraspberrypi-dev on Debian for arm64/armhf 72 | RUN if [ "$DIST" = "ubuntu" ] || [ "$TARGETPLATFORM" = "linux/amd64" ]; then \ 73 | if [ "$QT_VERSION" = "5" ]; then \ 74 | apt-get -y install libqt5x11extras5-dev; \ 75 | fi; \ 76 | apt-get -y install libxcb-util0-dev libxcb-randr0-dev libxcb-shm0-dev libxcb-render0-dev libxcb-image0-dev libxrandr-dev libxrender-dev; \ 77 | elif [ "$TARGETPLATFORM" = "linux/arm64" ] || [ "$TARGETPLATFORM" = "linux/arm/v7" ] && [ "$SUITE" != "trixie" ]; then \ 78 | apt-get -y install wget gpg dirmngr gpg-agent; \ 79 | echo "deb http://archive.raspberrypi.org/debian ${SUITE} main ui" >> /etc/apt/sources.list.d/raspi.list; \ 80 | apt-key adv --keyserver keyserver.ubuntu.com --recv-key 0x82B129927FA3303E; \ 81 | apt-get update && apt-get -y install libraspberrypi-dev; \ 82 | rm /etc/apt/sources.list.d/raspi.list; \ 83 | fi 84 | 85 | # Install CMake on amd64 and arm64 86 | # Compile and install CMake on armv7 87 | ENV CMAKE_URL="https://github.com/Kitware/CMake/releases/download/v${CMAKE_VERSION}/cmake-${CMAKE_VERSION}" 88 | RUN if [ "$TARGETPLATFORM" = "linux/amd64" ]; then \ 89 | curl -OLs ${CMAKE_URL}-linux-x86_64.sh; \ 90 | chmod +x cmake-${CMAKE_VERSION}-linux-x86_64.sh; \ 91 | ./cmake-${CMAKE_VERSION}-linux-x86_64.sh --skip-license --prefix="/usr"; \ 92 | rm -rf cmake-${CMAKE_VERSION}-linux-x86_64.sh; \ 93 | elif [ "$TARGETPLATFORM" = "linux/arm64" ]; then \ 94 | curl -OLs ${CMAKE_URL}-linux-aarch64.sh; \ 95 | chmod +x cmake-${CMAKE_VERSION}-linux-aarch64.sh; \ 96 | ./cmake-${CMAKE_VERSION}-linux-aarch64.sh --skip-license --prefix="/usr"; \ 97 | rm -rf cmake-${CMAKE_VERSION}-linux-aarch64.sh; \ 98 | else \ 99 | mkdir -p /tmp/cmake; \ 100 | cd /tmp/cmake; \ 101 | curl -kL ${CMAKE_URL}.tar.gz | tar zxf - -C . --strip-components 1; \ 102 | ./bootstrap --prefix=/usr; --parallel=`nproc`; \ 103 | make -j `nproc`; \ 104 | make install; \ 105 | cd && rm -rf /tmp/cmake; \ 106 | fi 107 | 108 | # Show cmake version 109 | RUN cmake --version 110 | 111 | # download qemu 112 | RUN if [ "$TARGETPLATFORM" = "linux/arm64" ]; then \ 113 | curl -kL https://github.com/balena-io/qemu/releases/download/v7.0.0%2Bbalena1/qemu-7.0.0.balena1-aarch64.tar.gz | tar zxvf - -C . --strip-components 1 && mv qemu-aarch64-static /usr/bin/qemu-static; \ 114 | elif [ "$TARGETPLATFORM" = "linux/arm/v6" ] || [ "$TARGETPLATFORM" = "linux/arm/v7" ]; then \ 115 | curl -kL https://github.com/balena-io/qemu/releases/download/v7.0.0%2Bbalena1/qemu-7.0.0.balena1-arm.tar.gz | tar zxvf - -C . --strip-components 1 && mv qemu-arm-static /usr/bin/qemu-static; \ 116 | else \ 117 | printf '#!/bin/bash\nexec "$@"' > /usr/bin/qemu-static; \ 118 | fi 119 | 120 | # set qemu exec flag 121 | RUN chmod +x /usr/bin/qemu-static 122 | 123 | # cleanup 124 | RUN apt-get clean -q -y && apt-get autoremove -y && rm -rf /var/lib/apt/lists/* 125 | 126 | # set entrypoint 127 | ENTRYPOINT [ "/usr/bin/qemu-static" ] 128 | -------------------------------------------------------------------------------- /.github/workflows/qt5_6.yml: -------------------------------------------------------------------------------- 1 | name: GitHub Packages Qt5/6 Builds 2 | 3 | on: 4 | # Reusable from package.yml 5 | workflow_call: 6 | inputs: 7 | distribution: 8 | type: string 9 | default: 'ubuntu' 10 | required: false 11 | codename: 12 | type: string 13 | default: 'jammy' 14 | required: false 15 | qt_version: 16 | type: string 17 | default: '6' 18 | required: false 19 | target_platform: 20 | type: string 21 | default: "['amd64']" 22 | required: false 23 | 24 | env: 25 | SECRET_DOCKER_CI: ${{ secrets.DOCKER_CI }} 26 | REPOSITORY: hyperion-project 27 | CMAKE_VERSION: 3.31.6 28 | 29 | jobs: 30 | 31 | build_and_push: 32 | name: 👷 Build ${{ matrix.target_platform }} 33 | runs-on: ${{ matrix.target_platform == 'amd64' && 'ubuntu-22.04' || 'ubuntu-22.04-arm' }} 34 | strategy: 35 | fail-fast: false 36 | matrix: 37 | target_platform: ${{ fromJson(inputs.target_platform) }} 38 | target_lookup: [{ 'amd64': 'linux/amd64', 'arm64': 'linux/arm64', 'armv6': 'linux/arm/v6', 'armv7': 'linux/arm/v7' }] 39 | isBullseyeQt6: 40 | - ${{ inputs.distribution == 'debian' && inputs.codename == 'bullseye' && inputs.qt_version == '6' }} 41 | exclude: 42 | - isBullseyeQt6: true 43 | target_platform: 'armv6' 44 | 45 | steps: 46 | - name: 👀 Checkout 47 | uses: actions/checkout@v6 48 | 49 | - name: ✅ Determine current Repository 50 | if: ${{ !startsWith(github.repository, env.REPOSITORY) }} 51 | run: echo "REPOSITORY=$(echo '${{ github.actor }}' | tr '[:upper:]' '[:lower:]')" >> ${GITHUB_ENV} 52 | 53 | - name: 🐳 Set up Docker Buildx 54 | uses: docker/setup-buildx-action@v3 55 | 56 | - name: 🐳 Set up Docker metadata 57 | id: meta 58 | uses: docker/metadata-action@v5 59 | with: 60 | images: ghcr.io/${{ env.REPOSITORY }}/${{ inputs.distribution }} 61 | tags: ${{ inputs.qt_version == '6' && format('{0}-qt6', inputs.codename) || inputs.codename }} 62 | labels: | 63 | org.opencontainers.image.description=Compilation environment to build Hyperion for ${{ inputs.distribution }} ${{ inputs.codename }} 64 | org.opencontainers.image.vendor=Hyperion Project 65 | org.opencontainers.image.authors=Hyperion Team 66 | org.opencontainers.image.url=${{ github.server_url }}/${{ env.REPOSITORY }} 67 | org.opencontainers.image.source=${{ github.server_url }}/${{ env.REPOSITORY }}/hyperion.docker-ci 68 | org.opencontainers.image.documentation=https://docs.hyperion-project.org 69 | org.opencontainers.image.licenses=MIT 70 | annotations: | 71 | org.opencontainers.image.description=Compilation environment to build Hyperion for ${{ inputs.distribution }} ${{ inputs.codename }} 72 | org.opencontainers.image.vendor=Hyperion Project 73 | org.opencontainers.image.authors=Hyperion Team 74 | org.opencontainers.image.url=${{ github.server_url }}/${{ env.REPOSITORY }} 75 | org.opencontainers.image.source=${{ github.server_url }}/${{ env.REPOSITORY }}/hyperion.docker-ci 76 | org.opencontainers.image.documentation=https://docs.hyperion-project.org 77 | org.opencontainers.image.licenses=MIT 78 | 79 | - name: 🔑 Login to GitHub Container Registry 80 | if: ${{ env.SECRET_DOCKER_CI != null }} 81 | uses: docker/login-action@v3 82 | with: 83 | registry: ghcr.io 84 | username: ${{ github.actor }} 85 | password: ${{ secrets.DOCKER_CI }} 86 | 87 | - name: 👷 Build and 🚀 Push digest to GitHub Container/Package Registry 88 | id: build 89 | uses: docker/build-push-action@v6 90 | with: 91 | context: . 92 | file: ${{ matrix.target_platform == 'armv6' && 'debian-armv6' || inputs.distribution == 'fedora' && 'fedora' || 'ubuntu_debian' }} 93 | platforms: ${{ matrix.target_lookup[format('{0}',matrix.target_platform)] }} 94 | labels: ${{ steps.meta.outputs.labels }} 95 | provenance: false 96 | outputs: type=image,name=ghcr.io/${{ env.REPOSITORY }}/${{ inputs.distribution }},push-by-digest=true,name-canonical=true,push=true 97 | build-args: | 98 | DIST=${{ inputs.distribution }} 99 | SUITE=${{ inputs.codename }} 100 | QT_VERSION=${{ inputs.qt_version }} 101 | REPOSITORY="${{ github.server_url }}/${{ env.REPOSITORY }}" 102 | CMAKE_VERSION=${{ env.CMAKE_VERSION }} 103 | 104 | - name: ⬇ Export digest 105 | run: | 106 | mkdir -p /tmp/digests 107 | digest="${{ steps.build.outputs.digest }}" 108 | touch "/tmp/digests/${digest#sha256:}" 109 | 110 | - name: 📦 Upload digest 111 | uses: actions/upload-artifact@v5 112 | with: 113 | name: ${{ inputs.distribution }}-${{ inputs.codename }}-qt${{ inputs.qt_version }}-${{ matrix.target_platform }} 114 | path: /tmp/digests/* 115 | if-no-files-found: error 116 | retention-days: 1 117 | 118 | merge: 119 | name: 👷 Merge and 🚀 Push 120 | needs: build_and_push 121 | runs-on: ubuntu-22.04 122 | 123 | steps: 124 | - name: 💾 Download digests 125 | uses: actions/download-artifact@v6 126 | with: 127 | path: /tmp/digests 128 | pattern: ${{ inputs.distribution }}-${{ inputs.codename }}-qt${{ inputs.qt_version }}-* 129 | merge-multiple: true 130 | 131 | - name: ✅ Determine current Repository 132 | if: ${{ !startsWith(github.repository, env.REPOSITORY) }} 133 | run: echo "REPOSITORY=$(echo '${{ github.actor }}' | tr '[:upper:]' '[:lower:]')" >> ${GITHUB_ENV} 134 | 135 | - name: 🐳 Set up Docker Buildx 136 | uses: docker/setup-buildx-action@v3 137 | 138 | - name: 🐳 Set up Docker metadata 139 | id: meta 140 | uses: docker/metadata-action@v5 141 | with: 142 | images: ghcr.io/${{ env.REPOSITORY }}/${{ inputs.distribution }} 143 | tags: ${{ inputs.qt_version == '6' && format('{0}-qt6', inputs.codename) || inputs.codename }} 144 | labels: | 145 | org.opencontainers.image.description=Compilation environment to build Hyperion for ${{ inputs.distribution }} ${{ inputs.codename }} 146 | org.opencontainers.image.vendor=Hyperion Project 147 | org.opencontainers.image.authors=Hyperion Team 148 | org.opencontainers.image.url=${{ github.server_url }}/${{ env.REPOSITORY }} 149 | org.opencontainers.image.source=${{ github.server_url }}/${{ env.REPOSITORY }}/hyperion.docker-ci 150 | org.opencontainers.image.documentation=https://docs.hyperion-project.org 151 | org.opencontainers.image.licenses=MIT 152 | annotations: | 153 | org.opencontainers.image.description=Compilation environment to build Hyperion for ${{ inputs.distribution }} ${{ inputs.codename }} 154 | org.opencontainers.image.vendor=Hyperion Project 155 | org.opencontainers.image.authors=Hyperion Team 156 | org.opencontainers.image.url=${{ github.server_url }}/${{ env.REPOSITORY }} 157 | org.opencontainers.image.source=${{ github.server_url }}/${{ env.REPOSITORY }}/hyperion.docker-ci 158 | org.opencontainers.image.documentation=https://docs.hyperion-project.org 159 | org.opencontainers.image.licenses=MIT 160 | 161 | - name: 🔑 Login to GitHub Container Registry 162 | if: ${{ env.SECRET_DOCKER_CI != null }} 163 | uses: docker/login-action@v3 164 | with: 165 | registry: ghcr.io 166 | username: ${{ github.actor }} 167 | password: ${{ secrets.DOCKER_CI }} 168 | 169 | - name: 📝 Create manifest list and 🚀 Push to GitHub Container/Package Registry 170 | working-directory: /tmp/digests 171 | run: | 172 | docker buildx imagetools create $(jq -cr '.tags | map("-t " + .) | join(" ")' <<< "$DOCKER_METADATA_OUTPUT_JSON") \ 173 | $(printf 'ghcr.io/${{ env.REPOSITORY }}/${{ inputs.distribution }}@sha256:%s ' *) 174 | 175 | - name: 👀 Inspect image 176 | run: | 177 | docker buildx imagetools inspect ${{ steps.meta.outputs.tags }} 178 | --------------------------------------------------------------------------------