diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 3df1cf1..ae70d84 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -1,7 +1,7 @@ name: Build Bazzite-Arch on: schedule: - - cron: '20 18 * * *' # 8:20pm everyday + - cron: '0 19 * * *' # 9:00pm everyday pull_request: branches: - main diff --git a/Containerfile b/Containerfile index 42baa25..e496287 100644 --- a/Containerfile +++ b/Containerfile @@ -1,85 +1,7 @@ -FROM quay.io/toolbx-images/archlinux-toolbox AS bazzite-arch +FROM ghcr.io/ublue-os/arch-distrobox AS bazzite-arch COPY system_files / -# Pacman Initialization -# Create build user -RUN sed -i 's/#Color/Color/g' /etc/pacman.conf && \ - printf "[multilib]\nInclude = /etc/pacman.d/mirrorlist\n" | tee -a /etc/pacman.conf && \ - sed -i 's/#MAKEFLAGS="-j2"/MAKEFLAGS="-j$(nproc)"/g' /etc/makepkg.conf && \ - pacman -Syu --noconfirm && \ - pacman -S \ - wget \ - base-devel \ - git \ - --noconfirm && \ - useradd -m --shell=/bin/bash build && usermod -L build && \ - echo "build ALL=(ALL) NOPASSWD: ALL" >> /etc/sudoers && \ - echo "root ALL=(ALL) NOPASSWD: ALL" >> /etc/sudoers - -# Distrobox Integration -USER build -WORKDIR /home/build -RUN git clone https://github.com/KyleGospo/xdg-utils-distrobox-arch.git --single-branch && \ - cd xdg-utils-distrobox-arch/trunk && \ - makepkg -si --noconfirm && \ - cd ../.. && \ - rm -drf xdg-utils-distrobox-arch -USER root -WORKDIR / -RUN git clone https://github.com/89luca89/distrobox.git --single-branch /tmp/distrobox && \ - cp /tmp/distrobox/distrobox-host-exec /usr/bin/distrobox-host-exec && \ - ln -s /usr/bin/distrobox-host-exec /usr/bin/flatpak && \ - wget https://github.com/1player/host-spawn/releases/download/$(cat /tmp/distrobox/distrobox-host-exec | grep host_spawn_version= | cut -d "\"" -f 2)/host-spawn-$(uname -m) -O /usr/bin/host-spawn && \ - chmod +x /usr/bin/host-spawn && \ - rm -drf /tmp/distrobox - -# Install packages Distrobox adds automatically, this speeds up first launch -RUN pacman -S \ - bash-completion \ - bc \ - curl \ - diffutils \ - findutils \ - glibc \ - gnupg \ - inetutils \ - keyutils \ - less \ - lsof \ - man-db \ - man-pages \ - mlocate \ - mtr \ - ncurses \ - nss-mdns \ - openssh \ - pigz \ - pinentry \ - procps-ng \ - rsync \ - shadow \ - sudo \ - tcpdump \ - time \ - traceroute \ - tree \ - tzdata \ - unzip \ - util-linux \ - util-linux-libs \ - vte-common \ - wget \ - words \ - xorg-xauth \ - zip \ - mesa \ - opengl-driver \ - vulkan-intel \ - vte-common \ - vulkan-radeon \ - --noconfirm - # Install needed packages RUN pacman -S \ lib32-vulkan-radeon \ @@ -118,15 +40,15 @@ RUN pacman -S \ --noconfirm # Steam/Lutris/Wine installed separately so they use the dependencies above and don't try to install their own. -# Add paru and install AUR packages +# Create build user +RUN useradd -m --shell=/bin/bash build && usermod -L build && \ + echo "build ALL=(ALL) NOPASSWD: ALL" >> /etc/sudoers && \ + echo "root ALL=(ALL) NOPASSWD: ALL" >> /etc/sudoers + +# Install AUR packages USER build WORKDIR /home/build -RUN git clone https://aur.archlinux.org/paru-bin.git --single-branch && \ - cd paru-bin && \ - makepkg -si --noconfirm && \ - cd .. && \ - rm -drf paru-bin && \ - paru -S \ +RUN paru -S \ aur/protontricks \ aur/latencyflex-git \ aur/vkbasalt \ @@ -135,7 +57,6 @@ RUN git clone https://aur.archlinux.org/paru-bin.git --single-branch && \ aur/lib32-obs-vkcapture-git \ aur/lib32-gperftools \ aur/steamcmd \ - aur/xcursor-breeze \ --noconfirm USER root WORKDIR / @@ -145,7 +66,6 @@ WORKDIR / # We do this last because it'll only apply to updates the user makes going forward. We don't want to optimize for the build host's environment. RUN sed -i 's@ (Runtime)@@g' /usr/share/applications/steam.desktop && \ sed -i 's/-march=x86-64 -mtune=generic/-march=native -mtune=native/g' /etc/makepkg.conf && \ - sed -i 's@#en_US.UTF-8@en_US.UTF-8@g' /etc/locale.gen && \ userdel -r build && \ rm -drf /home/build && \ sed -i '/build ALL=(ALL) NOPASSWD: ALL/d' /etc/sudoers && \