1
0
Fork 0
mirror of https://github.com/Phantop/dotfiles synced 2025-12-07 12:43:32 +00:00
dotfiles/.github/workflows/setup.yml

37 lines
1 KiB
YAML

name: Test dotfiles run
on:
workflow_dispatch: # allow manual trigger
push:
branches:
- main
jobs:
setup: # try setting up user with setup script
runs-on: ubuntu-latest
container: archlinux:latest
steps:
- name: Install git on container and add user
run: |
pacman -Sy --noconfirm git sudo
pacman-key --init
useradd -m glados -G wheel
echo '%wheel ALL=(ALL:ALL) NOPASSWD: ALL' > /etc/sudoers
- name: Checkout repo
uses: actions/checkout@v4
- name: Run setup
run: |
# Some stuff needed to avoid manual intervention
pacman -Rdd --noconfirm iptables
pacman -Sy --noconfirm pipewire-jack iptables-nft
cp -r /__w/dotfiles/dotfiles /home/glados/.dotfiles
su glados -c /home/glados/.dotfiles/bin/setup
mkdwarfs -i /home/glados -o /home.dwarfs
- name: Upload build artifact
uses: actions/upload-artifact@v4
with:
name: home.dwarfs
path: /home.dwarfs