Skip to content

Build Project GDL Live ISO #91

Build Project GDL Live ISO

Build Project GDL Live ISO #91

Workflow file for this run

name: Build Project GDL Live ISO
on:
push:
branches:
- main
workflow_dispatch:
jobs:
buildiso:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Install dependencies
run: |
sudo apt update
sudo apt install -y podman
- name: Notify about building an ISO
env:
TELEGRAM_TOKEN: ${{ secrets.TELEGRAM_TOKEN }}
TELEGRAM_CHAT_ID: ${{ secrets.TELEGRAM_CHAT_ID }}
run: |
python3 notify_about_building.py
- name: Install Distrobox
run: |
curl -s https://raw.githubusercontent.com/89luca89/distrobox/main/install | sh
- name: Create Arch Distrobox
run: |
distrobox create --root --image archlinux --name arch -Y
- name: Enter Arch Distrobox
run: |
distrobox enter --root arch -- sudo pacman -Syu arch-install-scripts archiso pnpm --noconfirm
- name: Scaffhold archiso directory
run: |
distrobox enter --root arch -- cp -r /usr/share/archiso/configs/releng/ archlive
- name: Configure archiso root user
run: |
echo "root:x:0:0:root:/root:/usr/bin/zsh" > archlive/airootfs/etc/passwd
echo "liveuser:x:1000:1000::/home/liveuser:/usr/bin/zsh" >> archlive/airootfs/etc/passwd
- name: Configure archiso root shadow
run: |
echo "root::14871::::::" > archlive/airootfs/etc/shadow
echo "liveuser::14871::::::" >> archlive/airootfs/etc/shadow
- name: Configure archiso root group
run: |
echo "root:x:0:root" > archlive/airootfs/etc/group
echo "adm:x:4:liveuser" >> archlive/airootfs/etc/group
echo "wheel:x:10:liveuser" >> archlive/airootfs/etc/group
echo "uucp:x:14:liveuser" >> archlive/airootfs/etc/group
echo "liveuser:x:1000:" >> archlive/airootfs/etc/group
- name: Configure archiso root gshadow
run: |
echo "root:!*::root" > archlive/airootfs/etc/gshadow
echo "liveuser:!*::" >> archlive/airootfs/etc/gshadow
- name: Setup autologin
run: |
python3 setup_autologin.py
- name: Generate os-release
run: |
cat os-release > archlive/airootfs/etc/os-release
- name: Patch profiledef.sh
run: |
python3 patch_profiledef.py
- name: Add some dependencies
run: |
python3 patch_packages.py
- name: Copy .config to archlive/airootfs/etc/skel
run: |
mkdir -p archlive/airootfs/etc/skel/.config
cp -r .config/hypr archlive/airootfs/etc/skel/.config/
cp -r .config/waybar archlive/airootfs/etc/skel/.config/
cp -r .config/alacritty archlive/airootfs/etc/skel/.config/
- name: Copy .zshrc for autostarting Hyprland
run: |
cp .zshrc archlive/airootfs/etc/skel/.zshrc
- name: Clone the installer
run: |
git clone https://github.com/GMDProjectL/installer
- name: Build and copy npm installer
run: |
mkdir archlive/airootfs/opt
python3 bootstrap_installer.py
cp -r ./installer archlive/airootfs/opt/installer
- name: Copy server systemd service from installer/assets/pgdl-server.service to /etc/systemd/system/pgdl-server.service
run: |
cp archlive/airootfs/opt/installer/assets/pgdl-server.service archlive/airootfs/etc/systemd/system/pgdl-server.service
- name: Activate the service (it requires network-online.target)
run: |
ln -s /etc/systemd/system/pgdl-server.service archlive/airootfs/etc/systemd/system/multi-user.target.wants/pgdl-server.service
- name: Adjust installer permissions
run: |
python3 adjust_installer_permissions.py
- name: Patch GRUB
run: |
python3 patch_grub.py
- name: Patch Systemd-boot
run: |
python3 patch_sdboot.py
- name: Patch mkinitcpio hooks
run: |
python3 patch_mkinitcpio_hooks.py
- name: Copy Plymouth theme
run: |
mkdir -p archlive/airootfs/usr/share/plymouth/themes
cp -r michigun archlive/airootfs/usr/share/plymouth/themes/
- name: Patch Plymouth default theme
run: |
python3 patch_plymouth_theme.py
- name: Activate the NetworkManager service
run: |
ln -s /usr/lib/systemd/system/NetworkManager.service archlive/airootfs/etc/systemd/system/multi-user.target.wants/NetworkManager.service
- name: Build archiso
run: |
distrobox enter --root arch --root -- sudo mkarchiso -v -w builddir archlive
- name: Upload the ISO to temp.sh
env:
TELEGRAM_TOKEN: ${{ secrets.TELEGRAM_TOKEN }}
TELEGRAM_CHAT_ID: ${{ secrets.TELEGRAM_CHAT_ID }}
run: |
python3 upload_iso.py
- name: Upload the ISO to artifacts
uses: actions/upload-artifact@v4
with:
path: out/*