1
0
Fork 0
mirror of https://github.com/JasonN3/build-container-installer.git synced 2025-12-25 10:57:55 +01:00
build-container-installer/.github/workflows/iso.yml
2024-02-13 19:20:28 +00:00

79 lines
1.9 KiB
YAML

name: Create and publish an ISO
on:
push:
branches:
- 'main'
tags:
- 'v*'
pull_request:
env:
IMAGE_REGISTRY: ghcr.io/${{ github.repository_owner }}
jobs:
build-and-push-iso:
runs-on: ubuntu-latest
needs:
- build-docker_cache-container
container:
image: fedora:39
options: "--privileged"
permissions:
contents: read
packages: write
steps:
- name: Install Tools
run: |
dnf install -y \
lorax \
xorriso \
podman \
git
- name: Checkout repository
uses: actions/checkout@v4
with:
submodules: recursive
- name: Download container to cache
run: |
podman pull ghcr.io/ublue-os/base-main:39
podman save --format oci-archive -o base-main.tar ghcr.io/ublue-os/base-main:39
- name: Create boot.iso
env:
version: "39"
arch: "x86_64"
run: |
lorax -p Fedora -v $version -r $version -t Server \
--isfinal --buildarch=${arch} --volid=Fedora-S-dvd-${arch}-${version} \
--macboot --noupgrade \
--repo /etc/yum.repos.d/fedora.repo \
--enablerepo fedora \
--repo /etc/yum.repos.d/fedora-updates.repo \
--enablerepo updates \
--add-template ${GITHUB_WORKSPACE}/lorax_templates/registry_cache.tmpl \
-i podman \
./results/
- name: Generate xorriso input
run: |
ln -s /registry_cache
bash scripts/gen_xorriso.sh | tee xorriso.txt
- name: Add additional files to ISO
run: |
xorriso -dialog on < xorriso.txt
- name: Upload ISO as Artifact
uses: actions/upload-artifact@v4
with:
name: ISOs
path: results/images/*.iso
if-no-files-found: error
retention-days: 0
compression-level: 0
overwrite: true