diff --git a/.github/workflows/nightly-build.yml b/.github/workflows/nightly-build.yml new file mode 100644 index 0000000..edfd9e8 --- /dev/null +++ b/.github/workflows/nightly-build.yml @@ -0,0 +1,37 @@ +name: Nightly ISO Build + +on: + schedule: + - cron: '1 0 * * *' # Daily at 00:01 UTC + workflow_dispatch: # Allow manual triggering + +jobs: + build-iso: + runs-on: ubuntu-latest + + steps: + - name: Checkout repository + uses: actions/checkout@v4 + + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v3 + + - name: Build ISO in Arch Linux container + run: | + docker run --rm \ + --privileged \ + -v "${{ github.workspace }}:/workspace" \ + -w /workspace \ + archlinux:latest \ + bash -c " + pacman -Syu --noconfirm && \ + chmod +x build_iso.sh && \ + ./build_iso.sh + " + + - name: Upload ISO artifact + uses: actions/upload-artifact@v4 + with: + name: omarchy-iso-${{ github.run_number }} + path: out/*.iso + retention-days: 30 \ No newline at end of file diff --git a/build_iso.sh b/build_iso.sh index eebb6b1..ca6d0d8 100755 --- a/build_iso.sh +++ b/build_iso.sh @@ -58,6 +58,12 @@ build_aur() { USERGROUPS_ENAB=yes userdel aurbuilder } +set_geo_mirror() { + # https://geo.mirror.pkgbuild.com/ + rm "$cache_dir/airootfs/etc/pacman.d/hooks/uncomment-mirrors.hook" + echo "Server = $1" > "$cache_dir/airootfs/etc/pacman.d/mirrorlist" +} + mkdir -p $cache_dir/ mkdir -p $aur_cache_dir/ @@ -124,4 +130,6 @@ rm "$cache_dir/airootfs/etc/motd" # file system. pip install "${python_packages[@]}" +set_geo_mirror "https://geo.mirror.pkgbuild.com/" + mkarchiso -v -w "$cache_dir/work/" -o "/out/" "$cache_dir/" \ No newline at end of file