image: alpine/3.14 packages: [coreutils, procps, py3-requests, xz] environment: DEVICE: pinephone VERSION: nightly GFX: wayland #GFX: x11 secrets: - f9885226-5149-444b-9dad-2981b0f02816 - a434f0f6-eb56-4b84-a0dd-77fc079450f8 sources: - "https://gitlab.com/postmarketOS/pmaports.git/" - "https://gitlab.com/postmarketOS/pmbootstrap.git/" tasks: - setup_device: | sed -i s/DEVICE/$DEVICE/ sxmo-image-builder-nightly/pmbootstrap.cfg - setup_binfmt: | sudo modprobe binfmt_misc sudo mount -t binfmt_misc none /proc/sys/fs/binfmt_misc - setup_pmbootstrap: | #cd pmaports && git checkout v21.06 && cd ../ mkdir -p ~/.config && cp sxmo-image-builder-nightly/pmbootstrap.cfg ~/.config/ yes "" | ./pmbootstrap/pmbootstrap.py --aports=$PWD/pmaports -q init - build_image: | ./pmbootstrap/pmbootstrap.py -mp=http://postmarketos1.brixit.nl/postmarketos/ update --arch aarch64 yes "mo" | ./pmbootstrap/pmbootstrap.py --details-to-stdout -mp=http://postmarketos1.brixit.nl/postmarketos/ install - sxmo_build: | ./pmbootstrap/pmbootstrap.py chroot -r git clone https://git.sr.ht/~mil/sxmo-build ./pmbootstrap/pmbootstrap.py chroot -r ./sxmo-build/sxmo_build_all.sh -- --$GFX ./pmbootstrap/pmbootstrap.py export images - compress_image: | du -h $(readlink images/pine64-$DEVICE.img) date sh -c 'xz -c $(readlink images/pine64-$DEVICE.img) > /home/build/compressed.img.xz' du -h /home/build/compressed.img.xz date - upload_image: | export TIME=$(date +%Y%m%d) export FILE=sxmo_$GFX_$DEVICE-sd.$VERSION-$TIME.img.xz md5sum /home/build/compressed.img.xz > /home/build/sum.md5 cat /home/build/sum.md5 ssh -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null $(cat ~/.user_at_server) "rm /home/public/images.lrdu.org/$DEVICE/sxmo_${GFX}*nightly*" ssh -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null $(cat ~/.user_at_server) "mkdir -p /home/public/images.lrdu.org/$DEVICE/" scp -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null /home/build/compressed.img.xz $(cat ~/.user_at_server):/home/public/images.lrdu.org/$DEVICE/$FILE scp -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null /home/build/sum.md5 $(cat ~/.user_at_server):/home/public/images.lrdu.org/$DEVICE/$FILE.md5