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 container: image: fedora:39 options: "--privileged" volumes: - /:/host permissions: contents: read packages: write steps: - name: Cleanup host space run: | df -h /host || true rm -rf /host/usr/local/lib/android || true rm -rf /host/usr/share/dotnet || true rm -rf /host/opt/ghc || true rm -rf /host/usr/local/.ghcup || true df -h /host || true - name: Install tools run: | dnf install -y \ lorax \ xorriso \ podman \ git \ rpm-ostree - name: Checkout repository uses: actions/checkout@v4 with: submodules: recursive - name: Download image run: | podman pull ghcr.io/ublue-os/base-main:39 podman save --format oci-dir -o container ghcr.io/ublue-os/base-main:39 podman rmi ghcr.io/ublue-os/base-main:39 - name: Create boot.iso env: version: "39" arch: "x86_64" variant: "Silverblue" run: | lorax -p Fedora -v $version -r $version --variant Silverblue \ --isfinal --buildarch=${arch} --volid=Fedora-S-dvd-${arch}-${version} \ --macboot --noupgrade \ --repo /etc/yum.repos.d/fedora.repo \ --repo /etc/yum.repos.d/fedora-updates.repo \ --add-template ${GITHUB_WORKSPACE}/lorax_templates/set_installer.tmpl \ --rootfs-size 9 \ ./results/ - name: Generate xorriso input run: | bash xorriso/gen_input.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/deploy.iso if-no-files-found: error retention-days: 0 compression-level: 0 overwrite: true