mirror of
https://github.com/JasonN3/build-container-installer.git
synced 2025-12-25 10:57:55 +01:00
add FLATPAK_REMOTE_REFS_DIR
This commit is contained in:
parent
4710f3002d
commit
32fd2be7c5
6 changed files with 49 additions and 29 deletions
2
.github/workflows/build-and-test.yml
vendored
2
.github/workflows/build-and-test.yml
vendored
|
|
@ -15,7 +15,7 @@ env:
|
|||
IMAGE_REPO: 'quay.io/fedora-ostree-desktops'
|
||||
IMAGE_TAG: '39'
|
||||
VARIANT: 'Server'
|
||||
FLATPAK_REMOTE_REFS: app/org.videolan.VLC/x86_64/stable runtime/org.kde.Platform/x86_64/5.15-23.08
|
||||
FLATPAK_REMOTE_REFS_DIR: flatpak_refs
|
||||
SECURE_BOOT_KEY_URL: 'https://github.com/ublue-os/akmods/raw/main/certs/public_key.der'
|
||||
ENROLLMENT_PASSWORD: 'container-installer'
|
||||
|
||||
|
|
|
|||
10
Makefile
10
Makefile
|
|
@ -16,6 +16,7 @@ WEB_UI = false
|
|||
FLATPAK_REMOTE_NAME = flathub
|
||||
FLATPAK_REMOTE_URL = https://flathub.org/repo/flathub.flatpakrepo
|
||||
FLATPAK_REMOTE_REFS =
|
||||
FLATPAK_REMOTE_REFS_DIR =
|
||||
# Secure boot
|
||||
ENROLLMENT_PASSWORD =
|
||||
SECURE_BOOT_KEY_URL =
|
||||
|
|
@ -60,6 +61,11 @@ else
|
|||
_PLATFORM_ID = platform:f$(VERSION)
|
||||
endif
|
||||
|
||||
ifneq ($(FLATPAK_REMOTE_REFS_DIR),)
|
||||
COLLECTED_REFS = $(foreach file,$(shell ls $(FLATPAK_REMOTE_REFS_DIR)/*),$(shell cat $(file)))
|
||||
FLATPAK_REMOTE_REFS += $(sort $(COLLECTED_REFS))
|
||||
endif
|
||||
|
||||
ifneq ($(FLATPAK_REMOTE_REFS),)
|
||||
_FLATPAK_REPO_GPG = $(shell curl -L $(FLATPAK_REMOTE_URL) | grep -i '^GPGKey=' | cut -d= -f2)
|
||||
_FLATPAK_REPO_URL = $(shell curl -L $(FLATPAK_REMOTE_URL) | grep -i '^URL=' | cut -d= -f2)
|
||||
|
|
@ -162,6 +168,8 @@ repos/%.repo: /etc/yum.repos.d/%.repo
|
|||
# Don't do anything for custom repos
|
||||
%.repo:
|
||||
|
||||
flatpak_list:
|
||||
|
||||
# Step 3: Build boot.iso using Lorax
|
||||
boot.iso: $(filter lorax_templates/%,$(_LORAX_TEMPLATES)) $(_REPO_FILES)
|
||||
rm -Rf $(_BASE_DIR)/results || true
|
||||
|
|
@ -253,4 +261,4 @@ test-vm:
|
|||
chmod +x $(foreach test,$(_TESTS),tests/vm/$(test))
|
||||
for test in $(_TESTS); do ./tests/vm/$${test} deploy.iso; done
|
||||
|
||||
.PHONY: clean install-deps test test-iso test-vm container/$(IMAGE_NAME)-$(IMAGE_TAG)
|
||||
.PHONY: clean install-deps test test-iso test-vm container/$(IMAGE_NAME)-$(IMAGE_TAG) flatpak_list
|
||||
|
|
|
|||
|
|
@ -39,11 +39,15 @@ The following variables can be used to customize the created ISO.
|
|||
|
||||
### Inputs
|
||||
| Variable | Description | Default Value |
|
||||
| -------------------- | ---------------------------------------------------------------------------- | ------------------------------ |
|
||||
| ---------------------- | ---------------------------------------------------------------------------- | -------------------------------------------- |
|
||||
| additional_templates | Space delimited list of additional Lorax templates to include | \[empty\] |
|
||||
| arch | Architecture for image to build | x86_64 |
|
||||
| enrollment_password | Used for supporting secure boot (requires SECURE_BOOT_KEY_URL to be defined) | container-installer |
|
||||
| extra_boot_params | Extra params used by grub to boot the anaconda installer | \[empty\] |
|
||||
| flatpak_remote_name | Name of the Flatpak repo on the destination OS | flathub |
|
||||
| flatpak_remote_refs | Space separated list of flatpak refs to install | \[empty\] |
|
||||
| flatpak_remote_refs_dir | Directory that contains files that list the flatpak refs to install | \[empty\] |
|
||||
| flatpak_remote_url | URL of the flatpakrepo file | https://flathub.org/repo/flathub.flatpakrepo |
|
||||
| image_name | Name of the source container image | base |
|
||||
| image_repo | Repository containing the source container image | quay.io/fedora-ostree-desktops |
|
||||
| image_tag | Tag of the source container image | *VERSION* |
|
||||
|
|
|
|||
29
action.yml
29
action.yml
|
|
@ -39,6 +39,10 @@ inputs:
|
|||
description: Space delimited list of refs to the flatpak packages to install
|
||||
required: false
|
||||
default: ""
|
||||
flatpak_remote_refs_dir:
|
||||
description: Directory that contains files that list the flatpak refs to install
|
||||
required: false
|
||||
default: ""
|
||||
flatpak_remote_url:
|
||||
description: The URL of the Flatpak remote flatpakrepo file
|
||||
required: false
|
||||
|
|
@ -152,19 +156,20 @@ runs:
|
|||
fi
|
||||
docker run --privileged --volume ${{ github.workspace }}:/github/workspace/ ${cache} ghcr.io/jasonn3/build-container-installer:${tag} \
|
||||
ADDITIONAL_TEMPLATES="${{ inputs.additional_templates }}" \
|
||||
ARCH=${{ inputs.arch }} \
|
||||
DNF_CACHE=/cache/dnf \
|
||||
ENROLLMENT_PASSWORD=${{ inputs.enrollment_password }} \
|
||||
FLATPAK_REMOTE_NAME=${{ inputs.flatpak_remote_name }} \
|
||||
ARCH="${{ inputs.arch }}" \
|
||||
DNF_CACHE="/cache/dnf" \
|
||||
ENROLLMENT_PASSWORD="${{ inputs.enrollment_password }}" \
|
||||
FLATPAK_REMOTE_NAME="${{ inputs.flatpak_remote_name }}" \
|
||||
FLATPAK_REMOTE_REFS="${{ inputs.flatpak_remote_refs }}" \
|
||||
FLATPAK_REMOTE_URL=${{ inputs.flatpak_remote_url }} \
|
||||
IMAGE_NAME=${{ inputs.image_name }} \
|
||||
IMAGE_REPO=${{ inputs.image_repo }} \
|
||||
IMAGE_TAG=${{ inputs.image_tag || inputs.version }} \
|
||||
SECURE_BOOT_KEY_URL=${{ inputs.secure_boot_key_url }} \
|
||||
VARIANT=${{ inputs.variant }} \
|
||||
VERSION=${{ inputs.version }} \
|
||||
WEB_UI=${{ inputs.web_ui }}
|
||||
FLATPAK_REMOTE_REFS_DIR="${{ inputs.flatpak_remote_refs_dir }}" \
|
||||
FLATPAK_REMOTE_URL="${{ inputs.flatpak_remote_url }}" \
|
||||
IMAGE_NAME="${{ inputs.image_name }}" \
|
||||
IMAGE_REPO="${{ inputs.image_repo }}" \
|
||||
IMAGE_TAG="${{ inputs.image_tag || inputs.version }}" \
|
||||
SECURE_BOOT_KEY_URL="${{ inputs.secure_boot_key_url }}" \
|
||||
VARIANT="${{ inputs.variant }}" \
|
||||
VERSION="${{ inputs.version }}" \
|
||||
WEB_UI="${{ inputs.web_ui }}"
|
||||
|
||||
- name: Save dnf cache
|
||||
env:
|
||||
|
|
|
|||
1
external/lorax
vendored
Submodule
1
external/lorax
vendored
Submodule
|
|
@ -0,0 +1 @@
|
|||
Subproject commit ffba3078beab843c5d663f6443dca28d8e820948
|
||||
2
flatpak_refs/VLC
Normal file
2
flatpak_refs/VLC
Normal file
|
|
@ -0,0 +1,2 @@
|
|||
app/org.videolan.VLC/x86_64/stable
|
||||
runtime/org.kde.Platform/x86_64/5.15-23.08
|
||||
Loading…
Add table
Add a link
Reference in a new issue