ci: consolidate ISO workflows into single dual-mode build-iso
build-iso / validate (push) Successful in 13s
ci / cook (push) Successful in 13s
build-iso / build-iso (push) Failing after 32s

Merge build-iso.yaml and build-iso_more-recent.yaml into one workflow.
- triggers: push to main (build + artifact) and v*.*.* tags (build + release)
- parametrize Fedora version and dish via env
- fix copyin source (cook/dishes/... .cfg) and artifact/release path
  (host path into the mock chroot, /var/lib/mock//root/var/lmc)
- install cook Python deps in the build job before make all
- drop build-iso_more-recent.yaml (superseded)
This commit is contained in:
Lukas Greve
2026-09-19 14:29:05 +02:00
parent 435ce41c02
commit d3189bee94
2 changed files with 45 additions and 84 deletions
+45 -25
View File
@@ -3,72 +3,92 @@ name: build-iso
on: on:
push: push:
branches: [main] branches: [main]
release: tags: ["v*.*.*"]
types: [published]
env:
FEDORA_VERSION: "44"
KICKSTART_FILE: desktop_44_standard_grub_gnome_guest-agents
jobs: jobs:
validate: validate:
runs-on: fedora runs-on: fedora
defaults:
run:
shell: bash
container: container:
image: git.phyllo.me/devops/fedora-runner-image:latest image: git.phyllo.me/devops/fedora-runner-image:latest
steps: steps:
- uses: https://git.phyllo.me/devops/checkout@v5 - uses: https://git.phyllo.me/devops/checkout@v5
with: with:
fetch-depth: 0 fetch-depth: 0
- name: Install dependencies - name: Install Python deps
run: | run: pip install -r cook/requirements.txt
pip install PyYAML pykickstart
- name: Generate, lint, and validate dishes - name: Generate, lint, and validate dishes
run: | run: |
cd cook cd cook
make all make all
build-iso: build-iso:
needs: validate needs: validate
runs-on: fedora runs-on: fedora
defaults:
run:
shell: bash
container: container:
image: git.phyllo.me/devops/fedora-runner-image:latest image: git.phyllo.me/devops/fedora-runner-image:latest
steps: steps:
- uses: https://git.phyllo.me/devops/checkout@v5 - uses: https://git.phyllo.me/devops/checkout@v5
with: with:
fetch-depth: 0 fetch-depth: 0
- name: Install Python deps
run: pip install -r cook/requirements.txt
- name: Initialize mock - name: Initialize mock
run: | run: |
mock -r fedora-44-x86_64 --init mock -r fedora-${{ env.FEDORA_VERSION }}-x86_64 --init
- name: Install required packages - name: Install required packages
run: | run: |
mock -r fedora-44-x86_64 --install lorax-lmc-novirt vim-minimal pykickstart livecd-tools mock -r fedora-${{ env.FEDORA_VERSION }}-x86_64 --install lorax-lmc-novirt vim-minimal pykickstart livecd-tools
- name: Generate dishes - name: Generate dishes
run: | run: |
cd cook cd cook
make all make all
- name: Copy configuration file to mock - name: Copy configuration file to mock
run: | run: |
mock -r fedora-44-x86_64 --copyin dishes/desktop_44_standard_grub_gnome_guest-agents.cfg /builddir mock -r fedora-${{ env.FEDORA_VERSION }}-x86_64 --copyin cook/dishes/${{ env.KICKSTART_FILE }}.cfg /builddir
- name: Build ISO with livemedia-creator - name: Build ISO with livemedia-creator
run: | run: |
mock -r fedora-44-x86_64 --shell --enable-network --isolation=simple << 'EOF' mock -r fedora-${{ env.FEDORA_VERSION }}-x86_64 --shell --enable-network --isolation=simple << 'EOF'
cd /builddir cd /builddir
livemedia-creator --ks desktop_44_standard_grub_gnome_guest-agents.cfg --no-virt --resultdir /var/lmc --project phyllomeos --make-iso --volid phyllomeos --iso-only --iso-name desktop-44.iso --releasever 44 --macboot livemedia-creator --ks ${{ env.KICKSTART_FILE }}.cfg --no-virt --resultdir /var/lmc --project phyllomeos --make-iso --volid phyllomeos --iso-only --iso-name ${{ env.KICKSTART_FILE }}-${{ env.FEDORA_VERSION }}.iso --releasever ${{ env.FEDORA_VERSION }} --macboot
EOF EOF
- name: Upload ISO as artifact - name: Upload ISO as artifact
if: github.ref == 'refs/heads/main'
uses: actions/upload-artifact@v3 uses: actions/upload-artifact@v3
with: with:
name: desktop-44.iso name: ${{ env.KICKSTART_FILE }}-${{ env.FEDORA_VERSION }}.iso
path: /var/lmc/desktop-44.iso path: /var/lib/mock/fedora-${{ env.FEDORA_VERSION }}-x86_64/root/var/lmc/${{ env.KICKSTART_FILE }}-${{ env.FEDORA_VERSION }}.iso
if-no-files-found: error if-no-files-found: error
- name: Publish ISO as release
if: startsWith(github.ref, 'refs/tags/')
uses: https://git.phyllo.me/devops/action-gh-release@v2
with:
files: /var/lib/mock/fedora-${{ env.FEDORA_VERSION }}-x86_64/root/var/lmc/${{ env.KICKSTART_FILE }}-${{ env.FEDORA_VERSION }}.iso
draft: false
prerelease: false
- name: Cleanup mock environment - name: Cleanup mock environment
if: always() if: always()
run: | run: |
mock -r fedora-44-x86_64 --clean mock -r fedora-${{ env.FEDORA_VERSION }}-x86_64 --clean
@@ -1,59 +0,0 @@
name: release
on:
push:
tags:
- "v*.*.*"
env:
FEDORA_VERSION: 44
KICKSTART_FILE: desktop_44_standard_grub_gnome_guest-agents
jobs:
checkout:
runs-on: fedora
defaults:
run:
shell: bash
steps:
- uses: https://git.phyllo.me/devops/checkout@v5
with:
fetch-depth: 0
- name: Initialize mock
run: |
mock -r fedora-${{ env.FEDORA_VERSION }}-x86_64 --init
- name: Install required packages
run: |
mock -r fedora-${{ env.FEDORA_VERSION }}-x86_64 --install lorax-lmc-novirt vim-minimal pykickstart livecd-tools
- name: Generate dishes
run: |
cd cook
make all
- name: Copy configuration file to mock
run: |
mock -r fedora-${{ env.FEDORA_VERSION }}-x86_64 --copyin dishes/${{ env.KICKSTART_FILE }} /builddir
- name: Build ISO with livemedia-creator
run: |
mock -r fedora-${{ env.FEDORA_VERSION }}-x86_64 --shell --enable-network --isolation=simple << 'EOF'
cd /builddir
livemedia-creator --ks ${{ env.KICKSTART_FILE }}.cfg --no-virt --resultdir /var/lmc --project ${{ env.KICKSTART_FILE }} --make-iso --volid ${{ env.KICKSTART_FILE }} --iso-only --iso-name ${{ env.KICKSTART_FILE }}-${{ env.FEDORA_VERSION }}.iso --releasever ${{ env.FEDORA_VERSION }} --macboot
EOF
- name: Release
uses: https://git.phyllo.me/devops/action-gh-release@v2
if: github.ref_type == 'tag'
with:
files: /var/lib/mock/fedora-${{ env.FEDORA_VERSION }}-x86_64/root/var/lmc/${{ env.KICKSTART_FILE }}-${{ env.FEDORA_VERSION }}.iso
draft: false
prerelease: false
- name: Cleanup mock environment
if: always()
run: |
mock -r fedora-${{ env.FEDORA_VERSION }}-x86_64 --clean