Skip to content

Reusable Build ISO

Reusable Build ISO #15

Workflow file for this run

name: Build SunnyOS with GNOME ISO
on:
workflow_dispatch:
inputs:
branch:
description: 'Branch to build'
required: true
default: 'sunnyos_gnome'
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Enable debugging
run: |
echo "ACTIONS_RUNNER_DEBUG=true" >> $GITHUB_ENV
echo "ACTIONS_STEP_DEBUG=true" >> $GITHUB_ENV
- name: Checkout code
uses: actions/checkout@v3
- name: Set up swap space
run: |
sudo fallocate -l 16G /swapfile
sudo chmod 600 /swapfile
sudo mkswap /swapfile
sudo swapon /swapfile
- name: Monitor resources before build
run: |
free -h
df -h
top -bn1 | head -n 20
- name: Build SunnyOS ISO
run: |
docker run --rm --privileged \
-v "$GITHUB_WORKSPACE:/work" \
-v "/tmp/temp:/tmp" \
--memory=16g --memory-swap=32g \
archlinux:latest /bin/bash -c "
pacman -Sy --noconfirm archiso &&
mkarchiso -v -w /tmp/work -o /tmp/out /work/profile
"
- name: Monitor resources after build
run: |
free -h
df -h
- name: Upload ISO artifact
uses: actions/upload-artifact@v3
with:
name: sunnyos-iso
path: /tmp/temp/out/*.iso