⏰ Scheduled build #20
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Package Repository | |
run-name: | | |
${{ github.event_name == 'schedule' && '⏰ Scheduled build' || '' }} | |
${{ github.event_name == 'push' && '🌱 Push Build -' || '' }} | |
${{ github.event_name == 'push' && github.event.head_commit.message || '' }} | |
on: | |
schedule: | |
- cron: '0 0 * * 0' | |
push: | |
branches: [ master ] | |
env: | |
SECRET_DOCKER_CI: ${{ secrets.DOCKER_CI }} | |
REPOSITORY: hyperion-project | |
jobs: | |
############################# | |
###### Ubuntu & Debian ###### | |
############################# | |
ubuntu_debian: | |
name: 🐧 ${{ matrix.os.description }} Qt ${{ matrix.qt_version }} | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: false | |
matrix: | |
os: [ | |
{ distribution: ubuntu, codename: focal, description: Ubuntu 20.04 (Focal Fossa) }, | |
{ distribution: ubuntu, codename: jammy, description: Ubuntu 22.04 (Jammy Jellyfish) }, | |
{ distribution: ubuntu, codename: lunar, description: Ubuntu 23.04 (Lunar Lobster) }, | |
{ distribution: ubuntu, codename: mantic, description: Ubuntu 23.10 (Mantic Minotaur) }, | |
{ distribution: debian, codename: buster, description: Debian 10.x (Buster) }, | |
{ distribution: debian, codename: bullseye, description: Debian 11.x (Bullseye) }, | |
{ distribution: debian, codename: bookworm, description: Debian 12.x (Bookworm) }, | |
{ distribution: debian, codename: trixie, description: Debian 13.x (Trixie) } | |
] | |
qt_version: [ '5', '6' ] | |
include: | |
# declare the following target_platform for all matrix jobs | |
- target_platform: linux/amd64,linux/arm64,linux/arm/v7 | |
# overwrite target_platform for the following matrix jobs (include linux/arm/v5) | |
- os: { distribution: debian, codename: bullseye } | |
target_platform: linux/amd64,linux/arm64,linux/arm/v5,linux/arm/v7 | |
- os: { distribution: debian, codename: bookworm } | |
target_platform: linux/amd64,linux/arm64,linux/arm/v5,linux/arm/v7 | |
- os: { distribution: debian, codename: trixie } | |
target_platform: linux/amd64,linux/arm64,linux/arm/v5,linux/arm/v7 | |
exclude: | |
# qt6 is not available on ubuntu focal and debian buster | |
- os: { distribution: ubuntu, codename: focal } | |
qt_version: '6' | |
- os: { distribution: debian, codename: buster } | |
qt_version: '6' | |
steps: | |
- name: 👀 Checkout | |
uses: actions/checkout@v4 | |
- name: ✅ Determine current Repository | |
if: ${{ !startsWith(github.repository, env.REPOSITORY) }} | |
run: echo "REPOSITORY=$(echo '${{ github.actor }}' | tr '[:upper:]' '[:lower:]')" >> ${GITHUB_ENV} | |
- name: 🛠️ Set up QEMU | |
uses: docker/setup-qemu-action@v3 | |
- name: 🐳 Set up Docker Buildx | |
uses: docker/setup-buildx-action@v3 | |
- name: 🔑 Login to GitHub Container Registry | |
if: ${{ env.SECRET_DOCKER_CI != null }} | |
uses: docker/login-action@v3 | |
with: | |
registry: ghcr.io | |
username: ${{ github.actor }} | |
password: ${{ secrets.DOCKER_CI }} | |
- name: 🐳 Set up Docker metadata | |
id: docker_metadata | |
uses: docker/metadata-action@v5 | |
with: | |
images: ghcr.io/${{ env.REPOSITORY }}/${{ matrix.os.distribution }} | |
tags: | | |
type=raw,value=${{ matrix.os.codename }},enable=${{ matrix.qt_version == '5' }} | |
type=raw,value=${{ matrix.os.codename }}-qt6,enable=${{ matrix.qt_version == '6' }} | |
labels: | | |
maintainer=Hyperion Project <[email protected]> | |
org.opencontainers.image.vendor=Hyperion Project | |
org.opencontainers.image.title=${{ matrix.os.description }} - QT ${{ matrix.qt_version }} | |
org.opencontainers.image.description=Compilation environment to build Hyperion for ${{ matrix.os.distribution }} ${{ matrix.os.codename }} | |
org.opencontainers.image.url=${{ github.server_url }} | |
org.opencontainers.image.source=${{ github.server_url }}/hyperion.docker-ci | |
org.opencontainers.image.documentation=https://docs.hyperion-project.org/ | |
org.opencontainers.image.licenses=MIT | |
- name: 👷 Build and 🚀 Push to GitHub Container/Package Registry | |
uses: docker/build-push-action@v5 | |
with: | |
context: . | |
file: ubuntu_debian | |
push: true | |
platforms: ${{ matrix.target_platform }} | |
provenance: false | |
tags: ${{ steps.docker_metadata.outputs.tags }} | |
labels: ${{ steps.docker_metadata.outputs.labels }} | |
build-args: | | |
DIST=${{ matrix.os.distribution }} | |
SUITE=${{ matrix.os.codename }} | |
QT_VERSION=${{ matrix.qt_version }} | |
REPOSITORY="${{ github.server_url }}/${{ env.REPOSITORY }}" | |
debian_buster_armv6: | |
name: 🐧 Debian 10.x (Buster) (armv6) Qt 5 | |
needs: [ ubuntu_debian ] | |
runs-on: ubuntu-latest | |
steps: | |
- name: 👀 Checkout | |
uses: actions/checkout@v4 | |
- name: ✅ Determine current Repository | |
if: ${{ !startsWith(github.repository, env.REPOSITORY) }} | |
run: echo "REPOSITORY=$(echo '${{ github.actor }}' | tr '[:upper:]' '[:lower:]')" >> ${GITHUB_ENV} | |
- name: 🛠️ Set up QEMU | |
uses: docker/setup-qemu-action@v3 | |
- name: 🐳 Set up Docker Buildx | |
uses: docker/setup-buildx-action@v3 | |
- name: 👷 Build, 🔀 Combine and 🚀 Push Debian Buster armv6 image | |
run: | | |
echo ${{ secrets.DOCKER_CI }} | docker login ghcr.io -u ${{ github.actor }} --password-stdin | |
docker buildx build --provenance=false --push --tag ghcr.io/${{ env.REPOSITORY }}/debian:buster-armv6 --platform linux/arm/v5 --file buster-armv6 . | |
docker buildx imagetools create -t ghcr.io/${{ env.REPOSITORY }}/debian:buster --append ghcr.io/${{ env.REPOSITORY }}/debian:buster-armv6 | |
#################### | |
###### Fedora ###### | |
#################### | |
fedora: | |
name: 🐧 ${{ matrix.description }} ${{ matrix.tag }} Qt ${{ matrix.qt_version }} | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: false | |
matrix: | |
tag: [ 37, 38, 39, 40 ] | |
qt_version: [ '5', '6' ] | |
include: | |
- dist: fedora | |
- description: Fedora | |
- target_platform: linux/amd64, linux/arm64 | |
steps: | |
- name: 👀 Checkout | |
uses: actions/checkout@v4 | |
- name: ✅ Determine current Repository | |
if: ${{ !startsWith(github.repository, env.REPOSITORY) }} | |
run: echo "REPOSITORY=$(echo '${{ github.actor }}' | tr '[:upper:]' '[:lower:]')" >> ${GITHUB_ENV} | |
- name: 🛠️ Set up QEMU | |
uses: docker/setup-qemu-action@v3 | |
- name: 🐳 Set up Docker Buildx | |
uses: docker/setup-buildx-action@v3 | |
- name: 🔑 Login to GitHub Container Registry | |
if: ${{ env.SECRET_DOCKER_CI != null }} | |
uses: docker/login-action@v3 | |
with: | |
registry: ghcr.io | |
username: ${{ github.actor }} | |
password: ${{ secrets.DOCKER_CI }} | |
- name: 🐳 Set up Docker metadata | |
id: docker_metadata | |
uses: docker/metadata-action@v5 | |
with: | |
images: ghcr.io/${{ env.REPOSITORY }}/${{ matrix.dist }} | |
tags: | | |
type=raw,value=${{ matrix.tag }},enable=${{ matrix.qt_version == '5' }} | |
type=raw,value=${{ matrix.tag }}-qt6,enable=${{ matrix.qt_version == '6' }} | |
labels: | | |
maintainer=Hyperion Project <[email protected]> | |
org.opencontainers.image.vendor=Hyperion Project | |
org.opencontainers.image.title=${{ matrix.description }} - QT ${{ matrix.qt_version }} | |
org.opencontainers.image.description=Compilation environment to build Hyperion for ${{ matrix.description }} ${{ matrix.tag }} | |
org.opencontainers.image.url=${{ github.server_url }} | |
org.opencontainers.image.source=${{ github.server_url }}/hyperion.docker-ci | |
org.opencontainers.image.documentation=https://docs.hyperion-project.org/ | |
org.opencontainers.image.licenses=MIT | |
- name: 👷 Build and 🚀 Push to GitHub Container/Package Registry | |
uses: docker/build-push-action@v5 | |
with: | |
context: . | |
file: fedora | |
push: ${{ env.SECRET_DOCKER_CI != null }} | |
platforms: ${{ matrix.target_platform }} | |
provenance: false | |
tags: ${{ steps.docker_metadata.outputs.tags }} | |
labels: ${{ steps.docker_metadata.outputs.labels }} | |
build-args: | | |
DIST=${{ matrix.dist }} | |
SUITE=${{ matrix.tag }} | |
QT_VERSION=${{ matrix.qt_version }} | |
REPOSITORY="${{ github.server_url }}/${{ env.REPOSITORY }}" |