workflows: upload os images on build

This commit is contained in:
Alex Zenla
2024-03-10 00:28:53 +00:00
parent 334d27a6a4
commit f1eedd1667
2 changed files with 20 additions and 8 deletions

View File

@ -16,14 +16,18 @@ docker run --rm --privileged -v "${PWD}:/mnt" -it alpine:latest "/mnt/os/interna
sudo chown "${USER}:${GROUP}" "${TARGET_OS_DIR}/rootfs.tgz"
sudo modprobe nbd
NBD_DEVICE="$(find /dev -maxdepth 2 -name 'nbd[0-9]*' | while read -r DEVICE
do
if [ "$(sudo blockdev --getsize64 "${DEVICE}")" = "0" ]
then
echo "${DEVICE}"
break
fi
done)"
next_nbd_device() {
find /dev -maxdepth 2 -name 'nbd[0-9]*' | while read -r DEVICE
do
if [ "$(sudo blockdev --getsize64 "${DEVICE}")" = "0" ]
then
echo "${DEVICE}"
break
fi
done
}
NBD_DEVICE="$(next_nbd_device)"
if [ -z "${NBD_DEVICE}" ]
then