mirror of
https://github.com/edera-dev/krata.git
synced 2025-08-03 05:10:55 +00:00
workflows: upload os images on build
This commit is contained in:
parent
334d27a6a4
commit
f1eedd1667
8
.github/workflows/os.yml
vendored
8
.github/workflows/os.yml
vendored
@ -3,9 +3,11 @@ on:
|
||||
push:
|
||||
paths:
|
||||
- "os/**"
|
||||
- "hack/os/**"
|
||||
pull_request:
|
||||
paths:
|
||||
- "os/**"
|
||||
- "hack/os/**"
|
||||
jobs:
|
||||
build:
|
||||
name: build
|
||||
@ -16,3 +18,9 @@ jobs:
|
||||
- run: ./hack/os/build.sh
|
||||
env:
|
||||
KRATA_KERNEL_BUILD_JOBS: "5"
|
||||
- uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: krata-os-x86_64
|
||||
path: "target/os/krata.qcow2"
|
||||
compression-level: 0
|
||||
|
@ -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
|
||||
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)"
|
||||
done
|
||||
}
|
||||
|
||||
NBD_DEVICE="$(next_nbd_device)"
|
||||
|
||||
if [ -z "${NBD_DEVICE}" ]
|
||||
then
|
||||
|
Loading…
Reference in New Issue
Block a user