Skip to content

Commit

Permalink
Initial ISO draft
Browse files Browse the repository at this point in the history
  • Loading branch information
p5 committed Aug 8, 2024
1 parent 5168f36 commit 56c4442
Show file tree
Hide file tree
Showing 3 changed files with 120 additions and 0 deletions.
85 changes: 85 additions & 0 deletions .github/actions/build-iso/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,85 @@
name: Build Image

inputs:
flatpak-manifest-list:
description: "The list of Flatpak packages to include in the image"
required: true
installer-version:
description: "The version of the Fedora installer to use"
required: true
image-registry:
description: "The registry to pull the image from"
required: true
image-name:
description: "The name of the image to build"
required: true
image-tag:
description: "The tag to apply to the image"
required: true

outputs:
iso-file:
description: "The ISO file location"
value: ""
checksum-file:
description: "The checksum file location"
value: ""

runs:
using: "composite"
steps:
- name: Get Flatpak dependencies
id: flatpak-dependencies
env:
IMAGE_FULL: ${{ inputs.image-registry }}/${{ inputs.image-name }}:${{ inputs.image-tag }}
shell: bash
run: |
set -euo pipefail
IMAGE="${IMAGE_FULL}"
# Create temporary directory
TEMP_FLATPAK_INSTALL_DIR=$(mktemp -d -p /tmp flatpak-XXXXXX)
# Read the list of Flatpak packages from the manifest
FLATPAK_REFS=()
while IFS= read -r line; do
FLATPAK_REFS+=("$line")
done < "${{ inputs.flatpak-manifest-list }}"
# Generate installation script
cat <<EOF > "${TEMP_FLATPAK_INSTALL_DIR}/install-flatpaks.sh"
mkdir -p /flatpak/flatpak /flatpak/triggers
mkdir /var/tmp
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 flathub ${FLATPAK_REFS[@]}
ostree refs --repo=\${FLATPAK_SYSTEM_DIR}/repo | grep '^deploy/' | grep -v 'org\.freedesktop\.Platform\.openh264' | sed 's/^deploy\///g' > /output/flatpaks-with-deps
EOF
docker run --rm --privileged \
--entrypoint /bin/bash \
-e FLATPAK_SYSTEM_DIR=/flatpak/flatpak \
-e FLATPAK_TRIGGERS_DIR=/flatpak/triggers \
-v ${FLATPAK_REFS_DIR}:/output \
-v ${TEMP_FLATPAK_INSTALL_DIR}:/temp_flatpak_install_dir \
${IMAGE} /temp_flatpak_install_dir/install-flatpaks.sh
docker rmi ${IMAGE}
- name: Build ISO
uses: jasonn3/[email protected]
id: build-iso
with:
arch: x86_64
image_name: ${{ inputs.image-name }}
image_repo: ${{ inputs.image-registry }}
image_tag: ${{ inputs.image-tag }}
variant: Kinoite
version: ${{ inputs.installer-version }}
secure_boot_key_url: "https://github.com/rsturla/akmods/raw/main/_certs/public_key.der"
enrollment_password: "password"
iso_name: "${{ inputs.image-name }}-${{ inputs.installer-version }}-${{ inputs.image-tag }}.iso"
enable_cache_dnf: false
enable_cache_skopeo: false
flatpak_remote_refs_dir: ${{ inputs.flatpak-manifest-list }}
enable_flatpak_dependencies: false
22 changes: 22 additions & 0 deletions .github/workflows/iso.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
name: Build ISOs

on:
pull_request:
paths:
- ".github/actions/build-iso/**"

jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Build ISO
uses: ./.github/actions/build-iso
with:
flatpak-manifest-list: ./flatpaks.txt
installer-version: 40
image-registry: ghcr.io/rsturla/eternal-linux/main
image-name: silverblue
image-tag: 40
13 changes: 13 additions & 0 deletions flatpaks.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
app/io.github.dvlv.boxbuddyrs/x86_64/stable
app/com.github.rafostar.Clapper/x86_64/stable
app/org.fedoraproject.MediaWriter/x86_64/stable
app/com.github.tchx84.Flatseal/x86_64/stable
app/io.github.flattool.Warehouse/x86_64/stable
app/org.gnome.baobab/x86_64/stable
app/org.gnome.Calculator/x86_64/stable
app/org.gnome.Calendar/x86_64/stable
app/org.gnome.Characters/x86_64/stable
app/org.gnome.clocks/x86_64/stable
app/org.gnome.Connections/x86_64/stable
app/org.gnome.Contacts/x86_64/stable
app/org.gnome.DejaDup/x86_64/stable

0 comments on commit 56c4442

Please sign in to comment.