From 89d1e900cdf328cab401b5723c687db0c2a33749 Mon Sep 17 00:00:00 2001 From: "Jason N." <33561705+JasonN3@users.noreply.github.com> Date: Fri, 9 Feb 2024 21:47:08 +0000 Subject: [PATCH] add workflow --- .github/workflows/iso.yml | 52 +++++++++++++++++++++++++++++++++++++++ .gitmodules | 1 + kickstart.ks | 1 + 3 files changed, 54 insertions(+) create mode 100644 .github/workflows/iso.yml create mode 100644 kickstart.ks diff --git a/.github/workflows/iso.yml b/.github/workflows/iso.yml new file mode 100644 index 0000000..4cca997 --- /dev/null +++ b/.github/workflows/iso.yml @@ -0,0 +1,52 @@ +name: Create and publish an ISO + +env: + MAJOR_VERION: "f39" + +on: + push: + branches: + - 'main' + tags: + - 'v*' + pull_request: + +jobs: + build-and-push-iso: + runs-on: ubuntu-latest + container: + image: fedora:${{ env.MAJOR_VERSION }} + options: "--device=/dev/loop-control:/dev/loop-control --device=/dev/loop0:/dev/loop0 --cap-add SYS_ADMIN" + permissions: + contents: read + packages: write + + steps: + - name: Install livecd-tools + run: | + dnf install -y \ + livecd-tools \ + pykickstart + + - name: Flatten Kickstart file + run: | + ksflatten \ + -c kickstart.ks \ + -o kickstart-flat.ks + + - name: Create ISO + run: | + livecd-creator --verbose \ + --config=kickstart-flat.ks \ + --fslabel=Fedora-LiveCD \ + --cache =/var/cache/live + + - name: Upload ISO as Artifact + uses: actions/upload-artifact@v4 + with: + name: installer.iso + path: something.iso + if-no-files-found: error + retention-days: 0 + compression-level: 0 + overwrite: true diff --git a/.gitmodules b/.gitmodules index 31c05d6..5bdcf9c 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,3 +1,4 @@ [submodule "submodules/fedora-kickstarts"] path = submodules/fedora-kickstarts url = https://pagure.io/fedora-kickstarts.git + branch = f39 diff --git a/kickstart.ks b/kickstart.ks new file mode 100644 index 0000000..31faec9 --- /dev/null +++ b/kickstart.ks @@ -0,0 +1 @@ +%include submodules/fedora-kickstarts/fedora-live-base.ks