ci: add arch docker image
This commit is contained in:
parent
2d5be8d36b
commit
6be5d8aad7
1 changed files with 43 additions and 0 deletions
43
.github/workflows/update-image.yml
vendored
Normal file
43
.github/workflows/update-image.yml
vendored
Normal file
|
|
@ -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 <<EOF
|
||||||
|
FROM archlinux:latest
|
||||||
|
RUN pacman -Syu --needed --noconfirm sudo base-devel cmake ninja fish git clang qt6-declarative python && \
|
||||||
|
useradd -m builder && \
|
||||||
|
echo 'builder ALL=(ALL) NOPASSWD:ALL' >> /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
|
||||||
Loading…
Add table
Reference in a new issue