mirror of
https://github.com/DefectingCat/dotfiles
synced 2025-07-15 16:51:36 +00:00
encapsluate install yay function
This commit is contained in:
@ -12,7 +12,7 @@ RUN useradd --groups wheel --no-create-home --shell /bin/zsh ${USER} \
|
||||
&& usermod -s "$(which zsh)" ${USER}
|
||||
WORKDIR /home/${USER}
|
||||
RUN rm -rf /home/${USER}/dotfiles \
|
||||
&& rm -rf /home/${USER}/yay
|
||||
&& rm -rf /home/${USER}/yay
|
||||
|
||||
RUN chown -R "${USER}":"${USER}" /home/"${USER}"
|
||||
USER ${USER}
|
||||
|
4
dockerfiles/github-action/Dockerfile
Normal file
4
dockerfiles/github-action/Dockerfile
Normal file
@ -0,0 +1,4 @@
|
||||
FROM archlinux
|
||||
|
||||
ARG USER=xfy
|
||||
WORKDIR /app
|
@ -1,13 +1,9 @@
|
||||
#!/bin/bash
|
||||
|
||||
source ./install-yay.sh
|
||||
|
||||
# install yay
|
||||
cd /home/"$USER"/ || exit
|
||||
git clone https://aur.archlinux.org/yay.git
|
||||
cd /home/"$USER"/yay || exit
|
||||
makepkg -si --noconfirm
|
||||
cd /home/"$USER"/ || exit
|
||||
rm -rf yay
|
||||
echo "install yay success"
|
||||
install_yay
|
||||
|
||||
cd /home/"$USER"/ || exit
|
||||
|
||||
|
11
scripts/install-yay.sh
Normal file
11
scripts/install-yay.sh
Normal file
@ -0,0 +1,11 @@
|
||||
#!/bin/bash
|
||||
|
||||
install_yay() {
|
||||
cd /home/"$USER"/ || exit
|
||||
git clone https://aur.archlinux.org/yay.git
|
||||
cd /home/"$USER"/yay || exit
|
||||
makepkg -si --noconfirm
|
||||
cd /home/"$USER"/ || exit
|
||||
rm -rf yay
|
||||
echo "install yay success"
|
||||
}
|
Reference in New Issue
Block a user