From 6be5d8aad7a9966a0d43173d7f210d370023421f Mon Sep 17 00:00:00 2001 From: 2 * r + 2 * t <61896496+soramanew@users.noreply.github.com> Date: Fri, 20 Mar 2026 20:23:02 +1100 Subject: [PATCH] ci: add arch docker image --- .github/workflows/update-image.yml | 43 ++++++++++++++++++++++++++++++ 1 file changed, 43 insertions(+) create mode 100644 .github/workflows/update-image.yml diff --git a/.github/workflows/update-image.yml b/.github/workflows/update-image.yml new file mode 100644 index 00000000..f57103c9 --- /dev/null +++ b/.github/workflows/update-image.yml @@ -0,0 +1,43 @@ +name: Update Docker CI image + +on: + workflow_dispatch: + schedule: + - cron: "0 0 * * 0" + +jobs: + update-flake: + runs-on: ubuntu-latest + + steps: + - uses: docker/login-action@v4 + with: + registry: ghcr.io + username: ${{ github.actor }} + password: ${{ secrets.GITHUB_TOKEN }} + + - name: Write Dockerfile + run: | + cat > /tmp/Dockerfile <> /etc/sudoers && \ + sudo -u git clone https://aur.archlinux.org/yay-bin.git /home/builder/yay-bin && \ + cd /home/builder/yay-bin && \ + sudo -u builder makepkg -si --noconfirm && \ + sudo -u builder yay -S --noconfirm quickshell-git && \ + sudo -u builder yay -Yc --noconfirm && \ + pacman -Rns --noconfirm yay-bin && \ + sed -i '/builder ALL=(ALL) NOPASSWD:ALL/d' /etc/sudoers && \ + userdel -r builder && \ + pacman -Scc --noconfirm + EOF + + - name: Build and push + uses: docker/build-push-action@v7 + with: + context: . + file: /tmp/Dockerfile + push: true + tags: ghcr.io/${{ github.repository }}/arch-env:latest