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 14:05:02 +00:00

79 lines
1.9 KiB
YAML

name: Create and publish an ISO
on:
push:
branches:
- 'main'
tags:
- 'v*'
pull_request:
jobs:
build-and-push-iso:
runs-on: ubuntu-latest
container:
image: fedora:39
options: "--privileged"
volumes:
- registry_cache:/registry_cache
services:
docker_registry:
image: docker.io/library/registry:2
ports:
- 8080:5000
volumes:
- registry_cache:/var/lib/registry
permissions:
contents: read
packages: write
steps:
- name: Install Tools
run: |
dnf install -y \
lorax \
podman \
git
- name: Checkout repository
uses: actions/checkout@v4
with:
submodules: recursive
- name: Download container to cache
run: |
cat << EOF >> /etc/containers/registries.conf
[[registry]]
location = "localhost:8080"
insecure = true
EOF
podman pull http://localhost:8080/ublue-os/base-main:39
- name: Show downloaded files
run: |
find /registry_cache
- 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 \
-i podman \
./results/
- name: Upload ISO as Artifact
uses: actions/upload-artifact@v4
with:
name: Fedora-LiveCD.iso
path: results/images/boot.iso
if-no-files-found: error
retention-days: 0
compression-level: 0
overwrite: true