Skip to content

feat: use Flathub's patched flatpak-builder #169

feat: use Flathub's patched flatpak-builder

feat: use Flathub's patched flatpak-builder #169

Workflow file for this run

name: Container Registry
on:
push:
branches: [main]
paths: [Dockerfile]
pull_request:
branches: [main]
paths: [Dockerfile]
schedule:
# Once a week
- cron: "0 0 * * */7"
workflow_dispatch:
jobs:
build:
name: Build
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
services:
registry:
image: registry:latest
ports:
- 5000:5000
strategy:
matrix:
runtime:
# freedesktop.org
#
# These are images for the freedesktop.org runtime, and those that
# add a few packages to support additional languages and so on.
- name: freedesktop
tag: 23.08
flathub: >
org.freedesktop.Platform/x86_64/23.08
org.freedesktop.Sdk/x86_64/23.08
org.freedesktop.Platform/aarch64/23.08
org.freedesktop.Sdk/aarch64/23.08
- name: freedesktop
tag: 24.08
flathub: >
org.freedesktop.Platform/x86_64/24.08
org.freedesktop.Sdk/x86_64/24.08
org.freedesktop.Platform/aarch64/24.08
org.freedesktop.Sdk/aarch64/24.08
- name: rust
tag: 23.08
flathub: >
org.freedesktop.Platform/x86_64/23.08
org.freedesktop.Sdk/x86_64/23.08
org.freedesktop.Platform/aarch64/23.08
org.freedesktop.Sdk/aarch64/23.08
org.freedesktop.Sdk.Extension.llvm17/x86_64/23.08
org.freedesktop.Sdk.Extension.rust-stable/x86_64/23.08
org.freedesktop.Sdk.Extension.llvm17/aarch64/23.08
org.freedesktop.Sdk.Extension.rust-stable/aarch64/23.08
- name: rust
tag: 24.08
flathub: >
org.freedesktop.Platform/x86_64/24.08
org.freedesktop.Sdk/x86_64/24.08
org.freedesktop.Platform/aarch64/24.08
org.freedesktop.Sdk/aarch64/24.08
org.freedesktop.Sdk.Extension.llvm18/x86_64/24.08
org.freedesktop.Sdk.Extension.rust-stable/x86_64/24.08
org.freedesktop.Sdk.Extension.llvm18/aarch64/24.08
org.freedesktop.Sdk.Extension.rust-stable/aarch64/24.08
# GNOME
#
# These are images for the GNOME runtime, and those that add a few
# things for e.g. Rust bindings.
- name: gnome
tag: 46
flathub: >
org.gnome.Platform/x86_64/46
org.gnome.Sdk/x86_64/46
org.gnome.Platform/aarch64/46
org.gnome.Sdk/aarch64/46
- name: gnome
tag: 47
flathub: >
org.gnome.Platform/x86_64/47
org.gnome.Sdk/x86_64/47
org.gnome.Platform/aarch64/47
org.gnome.Sdk/aarch64/47
- name: gnome
tag: master
gnome_nightly: >
org.gnome.Platform/x86_64/master
org.gnome.Sdk/x86_64/master
org.gnome.Platform/aarch64/master
org.gnome.Sdk/aarch64/master
- name: gnome-rust
tag: 46
flathub: >
org.gnome.Platform/x86_64/46
org.gnome.Sdk/x86_64/46
org.gnome.Platform/aarch64/46
org.gnome.Sdk/aarch64/46
org.freedesktop.Sdk.Extension.llvm17/x86_64/23.08
org.freedesktop.Sdk.Extension.rust-stable/x86_64/23.08
org.freedesktop.Sdk.Extension.llvm17/aarch64/23.08
org.freedesktop.Sdk.Extension.rust-stable/aarch64/23.08
- name: gnome-rust
tag: 47
flathub: >
org.gnome.Platform/x86_64/47
org.gnome.Sdk/x86_64/47
org.gnome.Platform/aarch64/47
org.gnome.Sdk/aarch64/47
org.freedesktop.Sdk.Extension.llvm18/x86_64/24.08
org.freedesktop.Sdk.Extension.rust-stable/x86_64/24.08
org.freedesktop.Sdk.Extension.llvm18/aarch64/24.08
org.freedesktop.Sdk.Extension.rust-stable/aarch64/24.08
- name: gnome-typescript
tag: 46
flathub: >
org.gnome.Platform/x86_64/46
org.gnome.Sdk/x86_64/46
org.gnome.Platform/aarch64/46
org.gnome.Sdk/aarch64/46
org.freedesktop.Sdk.Extension.node18/x86_64/23.08
org.freedesktop.Sdk.Extension.typescript/x86_64/23.08
- name: gnome-typescript
tag: 47
flathub: >
org.gnome.Platform/x86_64/47
org.gnome.Sdk/x86_64/47
org.gnome.Platform/aarch64/47
org.gnome.Sdk/aarch64/47
org.freedesktop.Sdk.Extension.node20/x86_64/24.08
org.freedesktop.Sdk.Extension.typescript/x86_64/24.08
- name: gnome-vala
tag: 46
flathub: >
org.gnome.Platform/x86_64/46
org.gnome.Sdk/x86_64/46
org.gnome.Platform/aarch64/46
org.gnome.Sdk/aarch64/46
org.freedesktop.Sdk.Extension.vala/x86_64/23.08
- name: gnome-vala
tag: 47
flathub: >
org.gnome.Platform/x86_64/47
org.gnome.Sdk/x86_64/47
org.gnome.Platform/aarch64/47
org.gnome.Sdk/aarch64/47
org.freedesktop.Sdk.Extension.vala/x86_64/24.08
# Workbench
#
# This is a special image for Workbench, that includes quite a few
# language extensions.
- name: workbench
tag: master
flathub: >
org.freedesktop.Sdk.Extension.llvm17/x86_64/23.08
org.freedesktop.Sdk.Extension.rust-stable/x86_64/23.08
org.freedesktop.Sdk.Extension.llvm17/aarch64/23.08
org.freedesktop.Sdk.Extension.rust-stable/aarch64/23.08
org.freedesktop.Sdk.Extension.node18/x86_64/23.08
org.freedesktop.Sdk.Extension.typescript/x86_64/23.08
org.freedesktop.Sdk.Extension.vala/x86_64/23.08
gnome_nightly: >
org.gnome.Platform/x86_64/master
org.gnome.Sdk/x86_64/master
org.gnome.Platform/aarch64/master
org.gnome.Sdk/aarch64/master
# KDE
#
# These are images for the KDE runtime. The maintainer doesn't use
# these, but feel free to open a PR if out-of-date.
- name: kde
tag: 5.15-23.08
flathub: >
org.kde.Platform/x86_64/5.15-23.08
org.kde.Sdk/x86_64/5.15-23.08
org.kde.Platform/aarch64/5.15-23.08
org.kde.Sdk/aarch64/5.15-23.08
fail-fast: false
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Login
if: ${{ github.event_name != 'pull_request' }}
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Setup Docker Buildx
uses: docker/setup-buildx-action@v3
with:
driver-opts: network=host
- name: Setup Cache
uses: actions/cache@v4
with:
path: /tmp/.buildx-cache
key: ${{ runner.os }}-buildx-${{ github.sha }}
restore-keys: |
${{ runner.os }}-buildx-
- name: Build Base Image
uses: docker/build-push-action@v6
with:
cache-from: type=local,src=/tmp/.buildx-cache
cache-to: type=local,dest=/tmp/.buildx-cache
file: Dockerfile
pull: true
push: true
tags: localhost:5000/flatter-base:latest
- name: Generate Dockerfile
run: |
cat >> ${{ matrix.runtime.name }}.Dockerfile << EOF
# syntax = docker/dockerfile:experimental
FROM localhost:5000/flatter-base:latest
EOF
if [ -n "${{ matrix.runtime.gnome_nightly }}" ]; then
cat >> ${{ matrix.runtime.name }}.Dockerfile << EOF
RUN --security=insecure flatpak install -y --noninteractive \
gnome-nightly \
${{ matrix.runtime.gnome_nightly }}
EOF
fi
if [ -n "${{ matrix.runtime.flathub_beta }}" ]; then
cat >> ${{ matrix.runtime.name }}.Dockerfile << EOF
RUN --security=insecure flatpak install -y --noninteractive \
flathub-beta \
${{ matrix.runtime.flathub_beta }}
EOF
fi
if [ -n "${{ matrix.runtime.flathub }}" ]; then
cat >> ${{ matrix.runtime.name }}.Dockerfile << EOF
RUN --security=insecure flatpak install -y --noninteractive \
flathub \
${{ matrix.runtime.flathub }}
EOF
fi
- name: Build
uses: docker/build-push-action@v6
with:
allow: security.insecure
context: .
file: ${{ matrix.runtime.name }}.Dockerfile
push: ${{ github.event_name != 'pull_request' }}
tags: ghcr.io/${{ github.repository }}/${{ matrix.runtime.name }}:${{ matrix.runtime.tag }}