Skip to content
This repository has been archived by the owner on May 8, 2024. It is now read-only.

Commit

Permalink
feat!: allow customized boot_menu.yml from consumer (#59)
Browse files Browse the repository at this point in the history
  • Loading branch information
akdev1l authored Apr 22, 2023
1 parent 5662d22 commit ebd119b
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 3 deletions.
1 change: 1 addition & 0 deletions .github/workflows/shellcheck.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ jobs:
image-name: ublue-test
installer-major-version: 38
installer-repo: releases
boot-menu-path: boot_menu.yml
- name: upload test result as artifact
uses: actions/upload-artifact@v3
with:
Expand Down
5 changes: 5 additions & 0 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,9 @@ inputs:
description: 'Output ISO filename'
required: false
default: ''
boot-menu-path:
description: boot_menu.yml to use for grub.cfg generation
required: true

runs:
using: composite
Expand Down Expand Up @@ -63,6 +66,8 @@ runs:
shell: bash
id: build
working-directory: ${{ github.action_path }}
env:
BOOT_MENU_PATH: ${{ github.workspace }}/${{ inputs.boot-menu-path }}
run: |
export REPO="${{ inputs.installer-repo }}"
./isopatch.sh Fedora-Everything-netinst-${{ inputs.cpu-arch }}.iso ${{ steps.iso-name.outputs.iso_name }}
Expand Down
8 changes: 5 additions & 3 deletions isopatch.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ export PS4='+ \e[31m${FUNCNAME[0]:-isopatch}\e[39m:\e[97m${LINENO}\e[39m:> '
set -ouex pipefail

# Global state, please keep to a minimum
BOOT_MENU_PATH="${BOOT_MENU_PATH:-boot_menu.yml}"
readonly BOOT_MENU_PATH
SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
readonly SCRIPT_DIR
WORK_DIR="$(mktemp -d -p "$SCRIPT_DIR")"
Expand Down Expand Up @@ -71,7 +73,7 @@ patch_grub_cfg() {
-D "VOLUME_ID=${VOLUME_ID}" \
-D "RELEASE=${RELEASE}" \
"${SCRIPT_DIR}/installer/overlay/${ARCH}/${GRUB_CFG}" \
boot_menu.yml
"${BOOT_MENU_PATH}"
done

sudo mount -o loop "${ESP_IMG}" "${WORK_DIR}/overlay/EFI"
Expand All @@ -85,7 +87,7 @@ patch_grub_cfg() {
-D "VOLUME_ID=${VOLUME_ID}" \
-D "RELEASE=${RELEASE}" \
"${SCRIPT_DIR}/installer/overlay/${ARCH}/${GRUB_CFG}" \
boot_menu.yml
"${BOOT_MENU_PATH}"
done

MBR_GRUB_CFG_FILES=(
Expand All @@ -98,7 +100,7 @@ patch_grub_cfg() {
-D "VOLUME_ID=${VOLUME_ID}" \
-D "RELEASE=${RELEASE}" \
"${SCRIPT_DIR}/installer/overlay/${ARCH}/${GRUB_CFG}" \
boot_menu.yml
"${BOOT_MENU_PATH}"
done
}

Expand Down

0 comments on commit ebd119b

Please sign in to comment.