130 lines
3.8 KiB
YAML
130 lines
3.8 KiB
YAML
name: Build Installer ISO
|
|
|
|
on:
|
|
workflow_dispatch:
|
|
|
|
jobs:
|
|
build-iso:
|
|
runs-on: ubuntu-latest
|
|
|
|
permissions:
|
|
contents: read
|
|
packages: read
|
|
|
|
steps:
|
|
- name: Checkout repository
|
|
uses: actions/checkout@v4 # v4 ist aktuell und stabil
|
|
|
|
- name: Free disk space
|
|
run: |
|
|
sudo rm -rf /usr/share/dotnet
|
|
sudo rm -rf /usr/local/lib/android
|
|
sudo rm -rf /opt/ghc
|
|
sudo rm -rf /opt/hostedtoolcache
|
|
df -h
|
|
|
|
- name: Prepare output directory
|
|
run: mkdir -p output
|
|
|
|
- name: Login to GHCR
|
|
run: |
|
|
# Wir nutzen hier kein sudo für den Login,
|
|
# sondern authentifizieren den User-Space
|
|
echo "${{ secrets.GITHUB_TOKEN }}" | podman login ghcr.io \
|
|
-u ${{ github.actor }} --password-stdin
|
|
|
|
- name: Pull base image
|
|
run: |
|
|
# Pull ohne sudo, damit die Layer im User-Storage liegen
|
|
podman pull ghcr.io/humocs-man/fluffy-pancake:stable
|
|
|
|
- name: Build ISO (Interactive Mode)
|
|
run: |
|
|
# Wir nutzen absolute Pfade mit ${{ github.workspace }}
|
|
# WICHTIG: Der bootc-image-builder braucht Zugriff auf den lokalen Podman-Sockel
|
|
# oder das Storage-Verzeichnis, um das Image zu finden.
|
|
|
|
sudo podman run --rm --privileged \
|
|
-v ${{ github.workspace }}/iso/config.toml:/config.toml:ro \
|
|
-v ${{ github.workspace }}/output:/output \
|
|
-v /var/lib/containers/storage:/var/lib/containers/storage \
|
|
quay.io/centos-bootc/bootc-image-builder:latest \
|
|
--type anaconda-iso \
|
|
--rootfs btrfs \
|
|
--config /config.toml \
|
|
--output /output/ \
|
|
ghcr.io/humocs-man/fluffy-pancake:stable
|
|
|
|
- name: Upload ISO artifact
|
|
uses: actions/upload-artifact@v4 # v4 ist die aktuelle Version
|
|
with:
|
|
name: installer-iso
|
|
path: output/anaconda-iso/deploy.iso # Der Builder erstellt meist diese Unterstruktur
|
|
if-no-files-found: errorname: Build Installer ISO
|
|
|
|
on:
|
|
workflow_dispatch:
|
|
#push:
|
|
#branches:
|
|
#- main
|
|
|
|
jobs:
|
|
build-iso:
|
|
runs-on: ubuntu-latest
|
|
|
|
permissions:
|
|
contents: read
|
|
packages: read
|
|
|
|
steps:
|
|
- name: Checkout repository
|
|
uses: actions/checkout@v6.0.2
|
|
|
|
- name: Free disk space
|
|
run: |
|
|
sudo rm -rf /usr/share/dotnet
|
|
sudo rm -rf /usr/local/lib/android
|
|
sudo rm -rf /opt/ghc
|
|
sudo rm -rf /opt/hostedtoolcache
|
|
df -h
|
|
|
|
|
|
- name: Prepare output directory
|
|
run: mkdir -p output
|
|
|
|
- name: Login to GHCR
|
|
run: |
|
|
echo "${{ secrets.GITHUB_TOKEN }}" | sudo podman login ghcr.io \
|
|
-u ${{ github.actor }} --password-stdin
|
|
|
|
|
|
# Wichtig: Den Pull explizit machen, damit Layer im lokalen Storage landen
|
|
- name: Pull base image
|
|
run: |
|
|
# Falls das Image privat ist, hier ein 'sudo podman login' davor setzen
|
|
sudo podman pull ghcr.io/humocs-man/fluffy-pancake:stable
|
|
|
|
|
|
|
|
- name: Build ISO (Interactive Mode)
|
|
run: |
|
|
# Wir mounten /var/lib/containers/storage, damit der Builder
|
|
# das oben gepullte Image direkt findet.
|
|
sudo podman run --rm --privileged \
|
|
-v ./iso/config.toml:/config.toml:ro \
|
|
-v ./output:/output \
|
|
-v /var/lib/containers/storage:/var/lib/containers/storage \
|
|
quay.io/centos-bootc/bootc-image-builder:latest \
|
|
--type anaconda-iso \
|
|
--rootfs btrfs \
|
|
--config /config.toml \
|
|
--output /output/ \
|
|
ghcr.io/humocs-man/fluffy-pancake:stable
|
|
|
|
- name: Upload ISO artifact
|
|
uses: actions/upload-artifact@v7
|
|
with:
|
|
name: installer-iso
|
|
path: output/**/*.iso
|
|
if-no-files-found: error
|