diff --git a/.gitea/workflows/builder.yaml b/.gitea/workflows/builder.yaml index 2057392..69d998a 100644 --- a/.gitea/workflows/builder.yaml +++ b/.gitea/workflows/builder.yaml @@ -23,10 +23,9 @@ jobs: ./build/amd64.sh - name: Upload ISO image to generic package registry run: | - curl --user your_username:your_password_or_token \ - --header 'authorization: Bearer ${{ secrets.GITEA_TOKEN }}' \ - --upload-file halis-debian-11.6.0-amd64.img.xz \ - https://git.halis.io/api/packages/athens-school/generic/halis-iso-arm64/0.0.1/halis-debian-11.6.0-amd64.img.xz + curl --header 'Authorization: token ${{ secrets.REGISTRY_TOKEN }}' \ + --upload-file halis-12.5.0-amd64.iso \ + https://git.halis.io/api/packages/athens-school/generic/halis-iso/0.0.1/halis-amd64.iso build-arm64: container: @@ -43,7 +42,8 @@ jobs: apt update apt install -y curl xz-utils file sudo ./build/arm64.sh - - name: Upload ISO image - uses: actions/upload-artifact@v4 - with: - path: ./*.img.xz + - name: Upload ISO image to generic package registry + run: | + curl --header 'Authorization: token ${{ secrets.REGISTRY_TOKEN }}' \ + --upload-file halis-11.6.0-arm64.img.xz \ + https://git.halis.io/api/packages/athens-school/generic/halis-iso/0.0.1/halis-arm64.img.xz diff --git a/build/amd64.sh b/build/amd64.sh index 1fece0f..86c3d69 100755 --- a/build/amd64.sh +++ b/build/amd64.sh @@ -1,6 +1,6 @@ #!/bin/sh -curl -LO http://ftp.acc.umu.se/debian-cd/12.5.0/amd64/iso-cd/debian-12.5.0-amd64-netinst.iso +curl -LO https://gemmei.ftp.acc.umu.se/mirror/cdimage/archive/12.5.0/amd64/iso-cd/debian-12.5.0-amd64-netinst.iso xorriso -osirrox on -indev debian-12.5.0-amd64-netinst.iso -extract / ./isofiles chmod +w -R isofiles/ gunzip ./isofiles/install.amd/initrd.gz @@ -13,4 +13,4 @@ cd isofiles sh -c "find -follow -type f ! -name md5sum.txt -print0 | xargs -0 md5sum > md5sum.txt" cd .. chmod -w -R isofiles/ -genisoimage -r -J -b isolinux/isolinux.bin -c isolinux/boot.cat -no-emul-boot -boot-load-size 4 -boot-info-table -o halis-debian-12.5.0-amd64.iso isofiles +genisoimage -r -J -b isolinux/isolinux.bin -c isolinux/boot.cat -no-emul-boot -boot-load-size 4 -boot-info-table -o halis-12.5.0-amd64.iso isofiles diff --git a/build/arm64.sh b/build/arm64.sh index 786c715..b4bb426 100755 --- a/build/arm64.sh +++ b/build/arm64.sh @@ -24,7 +24,7 @@ sudo chroot mnt /bin/sh <<"EOT" /usr/sbin/usermod -l creator pi /usr/sbin/usermod -d /home/creator -m creator -sed -i 's/creator:\*:/creator:\$6\$saltsalt\$EamwjkVXAe1WqiTTXuzgsmljl5cpVewMLH3xl8TdvQ\/V4S9e30upeNz2bdLkG5\.H71TCEso5Nl0jpyZRx7xy6\/:/g' /etc/shadow +sed -i 's/creator:!:/creator:\$6\$saltsalt\$EamwjkVXAe1WqiTTXuzgsmljl5cpVewMLH3xl8TdvQ\/V4S9e30upeNz2bdLkG5\.H71TCEso5Nl0jpyZRx7xy6\/:/g' /etc/shadow sudo -u creator mkdir -p -m 700 /home/creator/.ssh sudo -u creator sh -c 'echo "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIDYsz4jdyzf9UcJ8eEavVmi+DNYE3ioeJBfTlVMw7Vsb tanguy@Diogenes" > /home/creator/.ssh/authorized_keys' chmod 600 /home/creator/.ssh/authorized_keys @@ -37,7 +37,9 @@ EOT echo "Unmounting second partition" sudo umount mnt -R -echo "Compressing resulting image" -xz $RASPIOS_IMG +CORE_COUNT=$((`nproc`-1)) -cp $RASPIOS_IMG.xz halis-debian-11.6.0-amd64.img.xz +echo "Compressing resulting image" +xz -T$CORE_COUNT $RASPIOS_IMG + +mv $RASPIOS_IMG.xz halis-11.6.0-arm64.img.xz