This repository has been archived by the owner on Feb 22, 2024. It is now read-only.
forked from ublue-os/isogenerator-old
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathaction.yml
97 lines (90 loc) · 3.32 KB
/
action.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
name: Release ISO
description: 'Builds an ISO bundled with the provided Kickstart configuration'
inputs:
image-name:
description: 'Name of the image to build'
required: true
installer-major-version:
description: 'Major version of the installer to use'
required: true
installer-repo:
description: 'Fedora repository to use for the installer'
required: false
default: 'releases'
kickstart-file-path:
description: 'Path to the kickstart file'
required: true
cpu-arch:
description: 'CPU architecture for installer'
required: false
default: x86_64
output-filename:
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
steps:
- name: Calculate ISO name
id: iso-name
shell: bash
run: |
if [[ -z "${{inputs.output-filename }}" ]]; then
ISO_NAME="${{ inputs.image-name }}-${{ inputs.installer-major-version }}-${{ inputs.cpu-arch }}-$(date +%Y%m%d).iso"
else
ISO_NAME="${{ inputs.output-filename }}"
fi
echo "ISO name: ${ISO_NAME}"
echo "iso_name=${ISO_NAME}" >> $GITHUB_OUTPUT
- name: Install Dependencies
shell: bash
working-directory: ${{ github.action_path }}
run: |
PACKAGES=$(cat deps.txt)
dnf install \
--disablerepo='*' \
--enablerepo='baseos,appstream,extras' \
--setopt install_weak_deps=0 \
--assumeyes \
$PACKAGES
- name: Download Alma Linux Boot Installer
shell: bash
working-directory: ${{ github.action_path }}
id: iso
run: |
wget $ISO_INSTALLER_URL -O $ISO_INSTALLER
echo ISO_INSTALLER=$ISO_INSTALLER >> $GITHUB_OUTPUT
env:
ISO_INSTALLER_URL: https://repo.almalinux.org/almalinux/9.3/isos/x86_64/AlmaLinux-9.3-x86_64-boot.iso
ISO_INSTALLER: AlmaLinux-${{ inputs.installer-major-version }}-${{ inputs.cpu-arch }}.iso
#EVERYTHING_INSTALLER_URL: https://repo.almalinux.org/almalinux/${{ inputs.installer-major-version }}/isos/${{ inputs.cpu-arch }}/AlmaLinux-${{ inputs.installer-major-version }}-${{ inputs.cpu-arch }}.iso
- name: Build ISO
shell: bash
id: build
working-directory: ${{ github.action_path }}
env:
BOOT_MENU_PATH: ${{ github.workspace }}/${{ inputs.boot-menu-path }}
GITHUB_REPOSITORY_OWNER: ${{ github.repository_owner }}
REPO: ${{ inputs.installer-repo }}
run: |
./isopatch.sh ${{ steps.iso.outputs.ISO_INSTALLER }} ${{ steps.iso-name.outputs.iso_name }}
echo "ISO_FILENAME=${{ steps.iso-name.outputs.iso_name }}" >> $GITHUB_OUTPUT
- name: Calculate SHA256
id: calculate
shell: bash
working-directory: ${{ github.action_path }}
run: |
echo "SHA256SUM_FILENAME=${{ steps.iso-name.outputs.iso_name }}.sha256sum" >> $GITHUB_OUTPUT
outputs:
sha256sum-path:
description: 'Path to the calculated sha256sum'
value: ${{ steps.calculate.outputs.SHA256SUM_FILENAME }}
iso-path:
description: 'Path to the generated ISO'
value: ${{ steps.build.outputs.ISO_FILENAME }}
iso-name:
description: 'ISO name without path'
value: ${{ steps.iso-name.outputs.iso_name }}