mirror of
https://github.com/arthur-pbty/arch-custom-iso.git
synced 2026-08-01 20:28:05 +02:00
50 lines
1.2 KiB
YAML
50 lines
1.2 KiB
YAML
name: Build and Test Custom Arch ISO
|
|
|
|
on:
|
|
push:
|
|
branches: [ "main" ]
|
|
pull_request:
|
|
branches: [ "main" ]
|
|
workflow_dispatch:
|
|
|
|
jobs:
|
|
build-iso:
|
|
runs-on: ubuntu-latest
|
|
container:
|
|
image: archlinux:latest
|
|
options: --privileged
|
|
steps:
|
|
- name: Checkout repository
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Install build dependencies
|
|
run: |
|
|
pacman -Syu --noconfirm
|
|
pacman -S --noconfirm archiso git sudo base-devel fakeroot
|
|
|
|
- name: Create builder user
|
|
run: |
|
|
useradd -m -G wheel -s /bin/bash builder
|
|
echo "builder ALL=(ALL) NOPASSWD: ALL" >> /etc/sudoers
|
|
|
|
- name: Run ISO build script
|
|
run: |
|
|
chown -R builder:builder .
|
|
sudo -u builder bash ./build.sh
|
|
|
|
- name: Verify ISO creation
|
|
run: |
|
|
if [ -f out/*.iso ]; then
|
|
echo "ISO successfully built!"
|
|
ls -lh out/*.iso
|
|
else
|
|
echo "ISO build failed: No ISO file found in out/ directory."
|
|
exit 1
|
|
fi
|
|
|
|
- name: Upload ISO artifact
|
|
uses: actions/upload-artifact@v4
|
|
with:
|
|
name: arch-custom-iso
|
|
path: out/*.iso
|
|
retention-days: 7 |