This repository has been archived by the owner on May 8, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 15
/
action.yml
93 lines (86 loc) · 3.07 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
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='fedora,updates' \
--setopt install_weak_deps=0 \
--assumeyes \
$PACKAGES
- name: Download Fedora Everything Installer
shell: bash
working-directory: ${{ github.action_path }}
run: |
aria2c $EVERYTHING_INSTALLER_URL -o Fedora-Everything-netinst-${{ inputs.cpu-arch }}.iso
env:
EVERYTHING_INSTALLER_URL: https://na.edge.kernel.org/fedora/${{ inputs.installer-repo }}/${{ inputs.installer-major-version }}/Everything/${{ inputs.cpu-arch }}/os/images/boot.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 Fedora-Everything-netinst-${{ inputs.cpu-arch }}.iso ${{ 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 }}