feat(ci): Added ability to run the workflow manually and fix: general fixes (#17)
This commit is contained in:
parent
c2436908ed
commit
42d68772a0
|
@ -7,6 +7,7 @@ on:
|
|||
push:
|
||||
branches:
|
||||
- main
|
||||
workflow_dispatch:
|
||||
|
||||
jobs:
|
||||
push-image:
|
||||
|
|
|
@ -1,7 +1,11 @@
|
|||
# Used by buildah build --build-arg to create multiple different versions of the image
|
||||
ARG VERSION=39
|
||||
|
||||
FROM fedora:${VERSION}
|
||||
|
||||
# Set version for the environment variables in the container.
|
||||
ARG VERSION=39
|
||||
|
||||
ENV ARCH="x86_64"
|
||||
ENV IMAGE_NAME="base-main"
|
||||
ENV IMAGE_REPO="ghcr.io/ublue-os"
|
||||
|
@ -17,5 +21,4 @@ RUN dnf install -y make && make install-deps
|
|||
|
||||
VOLUME /isogenerator/output
|
||||
|
||||
ENTRYPOINT ["make", "output/${IMAGE_NAME}-${IMAGE_TAG}.iso"]
|
||||
CMD [ "ARCH=${ARCH}", "VERSION=${VERSION}", "IMAGE_REPO=${IMAGE_REPO}", "IMAGE_NAME=${IMAGE_NAME}", "IMAGE_TAG=${IMAGE_TAG}", "VARIANT=${VARIANT}", "WEB_UI=${WEB_UI}"]
|
||||
ENTRYPOINT ["sh", "-c", "make output/${IMAGE_NAME}-${IMAGE_TAG}.iso ARCH=${ARCH} VERSION=${VERSION} IMAGE_REPO=${IMAGE_REPO} IMAGE_NAME=${IMAGE_NAME} IMAGE_TAG=${IMAGE_TAG} VARIANT=${VARIANT} WEB_UI=${WEB_UI}"]
|
||||
|
|
6
Makefile
6
Makefile
|
@ -31,7 +31,7 @@ $(IMAGE_NAME)-$(IMAGE_TAG).iso: output/$(IMAGE_NAME)-$(IMAGE_TAG).iso
|
|||
|
||||
# Step 6: Build end ISO file
|
||||
output/$(IMAGE_NAME)-$(IMAGE_TAG).iso: boot.iso container/$(IMAGE_NAME)-$(IMAGE_TAG) xorriso/input.txt
|
||||
mkdir $(_BASE_DIR)/output
|
||||
mkdir $(_BASE_DIR)/output || true
|
||||
xorriso -dialog on < $(_BASE_DIR)/xorriso/input.txt
|
||||
|
||||
# Step 1: Generate Lorax Templates
|
||||
|
@ -48,7 +48,7 @@ lorax_templates/%.tmpl: lorax_templates/%.tmpl.in
|
|||
boot.iso: lorax_templates/set_installer.tmpl lorax_templates/configure_upgrades.tmpl
|
||||
rm -Rf $(_BASE_DIR)/results
|
||||
lorax -p $(IMAGE_NAME) -v $(VERSION) -r $(VERSION) -t $(VARIANT) \
|
||||
--isfinal --buildarch=$(ARCH) --volid=$(IMAGE_NAME)-$(ARCH)-$(VERSION) \
|
||||
--isfinal --buildarch=$(ARCH) --volid=$(IMAGE_NAME)-$(ARCH)-$(IMAGE_TAG) \
|
||||
$(_LORAX_ARGS) \
|
||||
--repo /etc/yum.repos.d/fedora.repo \
|
||||
--repo /etc/yum.repos.d/fedora-updates.repo \
|
||||
|
@ -59,7 +59,7 @@ boot.iso: lorax_templates/set_installer.tmpl lorax_templates/configure_upgrades.
|
|||
|
||||
# Step 3: Download container image
|
||||
container/$(IMAGE_NAME)-$(IMAGE_TAG):
|
||||
mkdir container
|
||||
mkdir container || true
|
||||
podman pull $(IMAGE_REPO)/$(IMAGE_NAME):$(IMAGE_TAG)
|
||||
podman save --format oci-dir -o $(_BASE_DIR)/container/$(IMAGE_NAME)-$(IMAGE_TAG) $(IMAGE_REPO)/$(IMAGE_NAME):$(IMAGE_TAG)
|
||||
podman rmi $(IMAGE_REPO)/$(IMAGE_NAME):$(IMAGE_TAG)
|
||||
|
|
15
README.md
15
README.md
|
@ -1,7 +1,6 @@
|
|||
# UBlueOS ISO Generator
|
||||
This action is used to generate the ISO images for UBlueOS.
|
||||
|
||||
|
||||
## Makefile
|
||||
A Makefile is provided for ease of use. There are separate targets for each file generated, however `make` can be used to generate the final image and `make clean` can be used to clean up the workspace.
|
||||
|
||||
|
@ -10,17 +9,21 @@ See [Customizing](#customizing) for information about customizing the image that
|
|||
## Container
|
||||
A container with the necessary tools already installed is provided at `ghcr.io/ublue-os/isogenerator:latest`
|
||||
|
||||
To use the container file, run `docker --privileged --volume .:/isogenerator/output ghcr.io/ublue-os/isogenerator`
|
||||
To use the container file, run `docker run --privileged --volume .:/isogenerator/output ghcr.io/ublue-os/isogenerator`.
|
||||
|
||||
This will create an ISO with the baked in defaults of the container image.
|
||||
|
||||
See [Customizing](#customizing) for information about customizing the image that gets created. The variable can either be defined as environment variables or as command arguments.
|
||||
Examples:
|
||||
Environment Variable
|
||||
|
||||
Creating Bluefin GTS ISO
|
||||
```bash
|
||||
docker --privileged --volume .:/isogenerator/output -e VERSION=39 ghcr.io/ublue-os/isogenerator
|
||||
docker run --rm --privileged --volume .:/isogenerator/output -e VERSION=38 -e IMAGE_NAME=bluefin -e IMAGE_TAG=gts -e VARIANT=Silverblue ghcr.io/ublue-os/isogenerator:38
|
||||
```
|
||||
Command Argument
|
||||
|
||||
Creating Bazzite Latest ISO
|
||||
```bash
|
||||
docker --privileged --volume .:/isogenerator/output ghcr.io/ublue-os/isogenerator VERSION=39
|
||||
docker run --rm --privileged --volume .:/isogenerator/output -e VERSION=39 -e IMAGE_NAME=bazzite -e IMAGE_TAG=latest -e VARIANT=Kinoite ghcr.io/ublue-os/isogenerator:39
|
||||
```
|
||||
|
||||
## Customizing
|
||||
|
|
|
@ -3,13 +3,12 @@
|
|||
echo "-indev $(pwd)/boot.iso"
|
||||
echo "-outdev $(pwd)/output/@IMAGE_NAME@-@IMAGE_TAG@.iso"
|
||||
echo "-boot_image any replay"
|
||||
echo "-volid @IMAGE_NAME@-@ARCH@-@IMAGE_TAG@"
|
||||
echo "-joliet on"
|
||||
echo "-compliance joliet_long_names"
|
||||
cd container
|
||||
for file in $(find @IMAGE_NAME@-@IMAGE_TAG@)
|
||||
do
|
||||
for file in $(find @IMAGE_NAME@-@IMAGE_TAG@); do
|
||||
echo "-map $(pwd)/${file} ${file}"
|
||||
echo "-chmod 0444 ${file}"
|
||||
done
|
||||
echo "-end"
|
||||
|
||||
|
|
Loading…
Reference in New Issue