Skip to content

Build Filotimo ISO

Build Filotimo ISO #34

Workflow file for this run

name: Build Filotimo ISO
on:
schedule:
- cron: '00 12 * * 2'
workflow_dispatch:
workflow_call:
concurrency:
group: ${{ github.workflow }}-${{ github.ref || github.run_id }}-iso
cancel-in-progress: true
jobs:
build-iso:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
id-token: write
strategy:
fail-fast: false
steps:
- name: Free Disk Space (Ubuntu)
uses: jlumbroso/[email protected]
- name: Checkout Repo
uses: actions/checkout@v4
- name: Build ISO
id: build
shell: bash
run: |
set -ex
image="ghcr.io/filotimo-project/filotimo:latest"
# Make temp space
TEMP_FLATPAK_INSTALL_DIR=$(mktemp -d -p "${{ github.workspace }}" flatpak.XXX)
# Get list of refs from directory
FLATPAK_REFS_DIR="${{ github.workspace }}/flatpaks"
FLATPAK_REFS_DIR_LIST=$(cat "${FLATPAK_REFS_DIR}"/* | tr '\n' ' ')
# Generate install script
cat << EOF > "${TEMP_FLATPAK_INSTALL_DIR}/script.sh"
#!/bin/bash
mkdir -p /flatpak/flatpak /flatpak/triggers
mkdir /var/tmp || true
chmod -R 1777 /var/tmp
flatpak config --system --set languages "*"
flatpak remote-add --system flathub https://flathub.org/repo/flathub.flatpakrepo
flatpak install --system -y ${FLATPAK_REFS_DIR_LIST}
ostree refs --repo=\${FLATPAK_SYSTEM_DIR}/repo | grep '^deploy/' | grep -v 'org\.freedesktop\.Platform\.openh264' | sed 's/^deploy\///g' > /output/flatpaks_with_deps
EOF
chmod +x "${TEMP_FLATPAK_INSTALL_DIR}/script.sh"
docker run --rm --privileged \
--entrypoint bash \
-e FLATPAK_SYSTEM_DIR=/flatpak/flatpak \
-e FLATPAK_TRIGGERSDIR=/flatpak/triggers \
--volume "${FLATPAK_REFS_DIR}:/output" \
--volume "${TEMP_FLATPAK_INSTALL_DIR}:/temp_flatpak_install_dir" \
"${image}" /temp_flatpak_install_dir/script.sh
docker rmi "${image}"
docker pull ghcr.io/filotimo-project/filotimo:latest
docker run --name=container-installer --privileged --volume /github/workspace/:/github/workspace/ \
ghcr.io/jasonn3/build-container-installer:v1.2.2 \
ARCH=x86_64 \
IMAGE_NAME=filotimo \
IMAGE_REPO=ghcr.io/filotimo-project \
IMAGE_TAG=latest \
VERSION=40 \
VARIANT=kinoite \
ISO_NAME=filotimo-latest-40.iso \
SECURE_BOOT_KEY_URL=https://github.com/ublue-os/akmods/raw/main/certs/public_key.der \
ENROLLMENT_PASSWORD=filotimo \
FLATPAK_REMOTE_REFS_DIR=/github/workspace/flatpaks \
ENABLE_FLATPAK_DEPENDENCIES=false
docker cp container-installer:/build-container-installer/filotimo-latest-40.iso ./
docker cp container-installer:/build-container-installer/filotimo-latest-40.iso-CHECKSUM ./
echo "iso_name=filotimo-latest-40.iso" >> $GITHUB_OUTPUT
echo "iso_path=$(readlink -f ./filotimo-latest-40.iso)" >> $GITHUB_OUTPUT
# This example is for uploading your ISO as a GitHub artifact. You can do something similar using any cloud storage, so long as you copy the output
- name: Upload ISO as artifact
id: upload
uses: actions/upload-artifact@v4
with:
name: ${{ steps.build.outputs.iso_name }}
path: |
${{ steps.build.outputs.iso_path }}
${{ steps.build.outputs.iso_path }}-CHECKSUM
if-no-files-found: error
retention-days: 0
compression-level: 0
overwrite: true