summaryrefslogtreecommitdiff
path: root/.github/workflows/build.yml
diff options
context:
space:
mode:
authortranch <tranch.xiao@gmail.com>2026-08-28 12:16:30 +0800
committertranch <tranch.xiao@gmail.com>2026-08-28 12:16:36 +0800
commit90c5e5ad9754825b7fbfb419f80a6816ec416e85 (patch)
tree7c1ba21867a866d4bf9b04c3e1bf47d8646759c5 /.github/workflows/build.yml
parent7889a92c2eea98189330ad1fbfbef4c33a7e3071 (diff)
downloadAeroCore-OS-90c5e5ad9754825b7fbfb419f80a6816ec416e85.tar.gz
AeroCore-OS-90c5e5ad9754825b7fbfb419f80a6816ec416e85.zip
fix: avoid corrupted system-release in ISO
Diffstat (limited to '.github/workflows/build.yml')
-rw-r--r--.github/workflows/build.yml20
1 files changed, 20 insertions, 0 deletions
diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml
index 02a6055..f27a1bb 100644
--- a/.github/workflows/build.yml
+++ b/.github/workflows/build.yml
@@ -163,6 +163,26 @@ jobs:
"${IMAGE_NAME}" \
"${DEFAULT_TAG}"
+ - name: Verify image metadata before publishing
+ run: |
+ sudo podman run --rm --entrypoint /usr/bin/bash \
+ "${IMAGE_NAME}:${DEFAULT_TAG}" -ceu '
+ system_release=/etc/system-release
+ if od -An -v -tx1 "$system_release" | awk '\''{ for (i = 1; i <= NF; i++) if ($i == "00") found = 1 } END { exit(found ? 0 : 1) }'\''; then
+ echo "NUL byte in ${system_release}" >&2
+ exit 1
+ fi
+ case "$(<"$system_release")" in
+ "AeroCore OS release $(rpm -E %fedora) ("*) ;;
+ *)
+ echo "Unexpected system-release: $(<"$system_release")" >&2
+ exit 1
+ ;;
+ esac
+ jq -e '\''.["image-name"] == "aerocore-os" and .["image-vendor"] == "aerocore-io"'\'' \
+ /usr/share/ublue-os/image-info.json >/dev/null
+ '
+
# If you are feeling adventurous, use the new distro agnostic rechunker
# https://github.com/coreos/chunkah
# You can delete the Rechunk with rpm-ostree portion then if you use this