name: release on: push: branches: - main schedule: - cron: '0 0 * * *' permissions: contents: write env: DOCKER_TOKEN: ${{ secrets.DOCKER_TOKEN }} jobs: release: name: Release runs-on: ubuntu-latest container: image: archlinux options: --privileged steps: - name: Checkout uses: actions/checkout@v4 - name: Initialize run: | pacman -Syuu --noconfirm base-devel archiso docker git git clone https://gitlab.archlinux.org/archlinux/archiso cp -rf ./cfg/profiledef.sh /usr/share/archiso/configs/releng/ cp -rf ./cfg/profiledef.sh ./archiso/configs/releng/profiledef.sh cp -rf ./cfg/profiledef.sh ./archiso/configs/baseline/profiledef.sh cp -rf ./scpt/mkarchiso ./archiso/archiso/mkarchiso ./archiso/archiso/mkarchiso -v -o ./ ./archiso/configs/releng/ tar xf aios-bootstrap*.tar.gz echo -e 'Server = http://mirrors.cat.net/archlinux/$repo/os/$arch\nServer = https://geo.mirror.pkgbuild.com/$repo/os/$arch' >> ./root.x86_64/etc/pacman.d/mirrorlist sed -i s/CheckSpace/#CheckeSpace/ root.x86_64/etc/pacman.conf arch-chroot root.x86_64 /bin/sh -c 'pacman-key --init' arch-chroot root.x86_64 /bin/sh -c 'pacman-key --populate archlinux' arch-chroot root.x86_64 /bin/sh -c 'pacman -Syu --noconfirm base base-devel linux vim git zsh rust openssh openssl jq' arch-chroot root.x86_64 /bin/sh -c 'git clone https://git.syui.ai/ai/bot && cd bot && cargo build && cp -rf ./target/debug/ai /bin/ && ai ai' tar -zcvf aios-bootstrap.tar.gz root.x86_64/ tar -C ./root.x86_64 -c . | docker import - syui/aios echo "${{ env.DOCKER_TOKEN }}" | docker login -u syui --password-stdin docker push syui/aios - name: Create new release uses: softprops/action-gh-release@v1 with: name: latest tag_name: latest files: aios-bootstrap.tar.gz