ci: test changes
All checks were successful
Build containers / Build and push image (asahi-cosmic, 43) (push) Successful in 9m43s

This commit is contained in:
2026-02-27 22:21:40 +01:00
parent 5899034478
commit 51a4ad4687
2 changed files with 77 additions and 33 deletions

View File

@@ -1,7 +1,6 @@
#!/bin/bash
set -euxo pipefail
# Usage: ./builder.sh <image-name> <version>
if [[ $# -lt 2 ]]; then
echo "Usage: $0 <image-name> <version>"
exit 1
@@ -12,7 +11,7 @@ VERSION="$2"
IMAGE_DIR="images/${IMAGE}"
MANIFEST="${IMAGE_DIR}/manifest.yaml"
OUTPUT="${IMAGE_DIR}/manifest.ociarchive"
ROOTFS="${IMAGE_DIR}/rootfs"
REF="images/${IMAGE}/${VERSION}"
# --- CHECKS ---
@@ -48,11 +47,9 @@ cp images/shared/*.repo "${IMAGE_DIR}/"
cp "${IMAGE_DIR}"/repos/*.repo "${IMAGE_DIR}/"
# --- MANIFEST FIXUPS ---
# Remove existing ref: and releasever:
sed -i '/^ref:/d' "$MANIFEST"
sed -i '/^releasever:/d' "$MANIFEST"
# Insert new values at top
sed -i "1i releasever: ${VERSION}" "$MANIFEST"
sed -i "1i ref: ${REF}" "$MANIFEST"
@@ -65,12 +62,14 @@ else
echo "No postprocess.sh found in ${IMAGE_DIR}, skipping."
fi
# --- COMPOSE IMAGE ---
# --- COMPOSE ROOTFS ---
ARGS=(
"--cachedir=cache"
)
rm -rf "${ROOTFS:?}"
rpm-ostree compose rootfs \
"${ARGS[@]}" \
"$MANIFEST" \
"$OUTPUT"
"$ROOTFS"