mirror of
https://github.com/JasonN3/build-container-installer.git
synced 2025-12-25 10:57:55 +01:00
add flatpaks
This commit is contained in:
parent
88d7731848
commit
90edae91c1
5 changed files with 32 additions and 3 deletions
2
.github/workflows/build-and-test.yml
vendored
2
.github/workflows/build-and-test.yml
vendored
|
|
@ -15,6 +15,7 @@ env:
|
|||
IMAGE_REPO: 'quay.io/fedora-ostree-desktops'
|
||||
VERSION: '39'
|
||||
VARIANT: 'Server'
|
||||
FLATPAK_REFS: app/org.videolan.VLC/x86_64/stable
|
||||
|
||||
jobs:
|
||||
build-container:
|
||||
|
|
@ -88,6 +89,7 @@ jobs:
|
|||
version: ${{ env.VERSION }}
|
||||
variant: ${{ env.VARIANT }}
|
||||
action_version: ${{ steps.meta.outputs.tags || 'latest' }}
|
||||
flatpak_remote_refs: ${{ env.FLATPAK_REFS }}
|
||||
|
||||
- name: Rename ISO
|
||||
run: |
|
||||
|
|
|
|||
4
.gitmodules
vendored
Normal file
4
.gitmodules
vendored
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
[submodule "external/fedora-lorax-templates"]
|
||||
path = external/fedora-lorax-templates
|
||||
url = https://pagure.io/fedora-lorax-templates.git
|
||||
branch = f39
|
||||
9
Makefile
9
Makefile
|
|
@ -9,6 +9,10 @@ VARIANT = Server
|
|||
WEB_UI = false
|
||||
REPOS = /etc/yum.repos.d/fedora.repo /etc/yum.repos.d/fedora-updates.repo
|
||||
ADDITIONAL_TEMPLATES = ""
|
||||
FLATPAK_REMOTE_NAME = flathub
|
||||
FLATPAK_REMOTE_URL = https://dl.flathub.org/repo/
|
||||
FLATPAK_REMOTE_REFS =
|
||||
|
||||
ROOTFS_SIZE = 4
|
||||
|
||||
# Generated vars
|
||||
|
|
@ -19,6 +23,8 @@ _IMAGE_REPO_DOUBLE_ESCAPED = $(subst \,\\\,$(_IMAGE_REPO_ESCAPED))
|
|||
_VOLID = $(firstword $(subst -, ,$(IMAGE_NAME)))-$(ARCH)-$(IMAGE_TAG)
|
||||
_REPO_FILES = $(subst /etc/yum.repos.d,repos,$(REPOS))
|
||||
_LORAX_TEMPLATES = $(subst .in,,$(shell ls lorax_templates/*.tmpl.in))
|
||||
_FLATPAK_TEMPLATES = $(_BASE_DIR)/external/fedora-lorax-templates/ostree-based-installer/lorax-embed-flatpaks.tmpl
|
||||
_TEMPLATE_VARS = FLATPAK_REMOTE_NAME FLATPAK_REMOTE_URL FLATPAK_REMOTE_REFS
|
||||
|
||||
ifeq ($(VARIANT),Server)
|
||||
_LORAX_ARGS = --macboot --noupgrade
|
||||
|
|
@ -42,7 +48,6 @@ lorax_templates/%.tmpl: lorax_templates/%.tmpl.in
|
|||
$(eval _VARS = IMAGE_NAME IMAGE_TAG _IMAGE_REPO_DOUBLE_ESCAPED)
|
||||
$(foreach var,$(_VARS),$(var)=$($(var))) envsubst '$(foreach var,$(_VARS),$$$(var))' < $(_BASE_DIR)/lorax_templates/$*.tmpl.in > $(_BASE_DIR)/lorax_templates/$*.tmpl
|
||||
|
||||
|
||||
# Step 2: Replace vars in repo files
|
||||
repos/%.repo: /etc/yum.repos.d/%.repo
|
||||
mkdir repos || true
|
||||
|
|
@ -63,7 +68,9 @@ boot.iso: $(_LORAX_TEMPLATES) $(_REPO_FILES)
|
|||
$(foreach file,$(_REPO_FILES),--repo $(_BASE_DIR)/$(file)) \
|
||||
$(foreach file,$(_LORAX_TEMPLATES),--add-template $(_BASE_DIR)/$(file)) \
|
||||
$(foreach file,$(ADDITIONAL_TEMPLATES),--add-template $(file)) \
|
||||
$(foreach file,$(_FLATPAK_TEMPLATES),--add-template $(file)) \
|
||||
--rootfs-size $(ROOTFS_SIZE) \
|
||||
$(foreach var,$(_TEMPLATE_VARS),--add-template-var "$(var)=$($(var))") \
|
||||
$(_BASE_DIR)/results/
|
||||
mv $(_BASE_DIR)/results/images/boot.iso $(_BASE_DIR)/
|
||||
|
||||
|
|
|
|||
19
action.yml
19
action.yml
|
|
@ -34,8 +34,20 @@ inputs:
|
|||
required: true
|
||||
default: "latest"
|
||||
additional_templates:
|
||||
description: Space delimetered list of additional Lorax templates to include
|
||||
description: Space delimited list of additional Lorax templates to include
|
||||
required: false
|
||||
flatpak_remote_name:
|
||||
description: Name of the Flatpak remote repo
|
||||
required: false
|
||||
default: "flathub"
|
||||
flatpak_remote_url:
|
||||
description: The URL of the Flatpak remote repo
|
||||
required: false
|
||||
default: https://dl.flathub.org/repo/
|
||||
flatpak_remote_refs:
|
||||
description: Space delimited list of refs to the flatpak packages to install
|
||||
required: false
|
||||
default: ""
|
||||
|
||||
runs:
|
||||
using: composite
|
||||
|
|
@ -51,5 +63,8 @@ runs:
|
|||
VERSION=${{ inputs.version }} \
|
||||
IMAGE_TAG=${{ inputs.image_tag || inputs.version }} \
|
||||
WEB_UI=${{ inputs.web_ui }} \
|
||||
"ADDITIONAL_TEMPLATES=${{ inputs.additional_templates }}"
|
||||
"ADDITIONAL_TEMPLATES=${{ inputs.additional_templates }}" \
|
||||
FLATPAK_REMOTE_NAME=${{ inputs.flatpak_remote_name }} \
|
||||
FLATPAK_REMOTE_URL=${{ inputs.flatpak_remote_url }} \
|
||||
FLATPAK_REMOTE_REFS=${{ inputs.flatpak_remote_refs }}
|
||||
|
||||
|
|
|
|||
1
external/fedora-lorax-templates
vendored
Submodule
1
external/fedora-lorax-templates
vendored
Submodule
|
|
@ -0,0 +1 @@
|
|||
Subproject commit cc1155372046baa58f9d2cc27a9e5473bf05a3fb
|
||||
Loading…
Add table
Add a link
Reference in a new issue