diff options
author | Cody Wyatt Neiman | 2022-07-30 14:50:05 -0400 |
---|---|---|
committer | Cody Wyatt Neiman | 2022-07-30 14:50:05 -0400 |
commit | ff8e9d1098ae7c227d03d8a094186cbcd797453b (patch) | |
tree | 665bce1295bb6e75945d196aa60a422fbb352ad7 | |
parent | f37331ba0339062ad39417ba0c060c7308984d63 (diff) | |
download | aur-ff8e9d1098ae7c227d03d8a094186cbcd797453b.tar.gz |
fix(cicd): run deploy as builduser
-rw-r--r-- | .gitlab-ci.yml | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 955c2c35531f..b88336980ccf 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -52,12 +52,17 @@ aur: dependencies: - makepkg before_script: - - pacman -Syu --noconfirm openssh git - - echo $SSH_KEY_B64 | base64 -di > ~/.ssh/id_rsa - - git remote add aur ssh://aur@aur.archlinux.org/$CI_PROJECT_NAME.git - - git fetch aur + - pacman -Syu --noconfirm sudo + - cp yay /usr/sbin/yay + - useradd builduser -m && passwd -d builduser + - printf 'builduser ALL=(ALL) ALL\n' | tee -a /etc/sudoers + - sudo -u builduser bash -c 'yay --noconfirm' + - sudo -u builduser bash -c 'yay -S --noconfirm openssh git' + - sudo -u builduser bash -c 'echo $SSH_KEY_B64 | base64 -di > ~/.ssh/id_rsa' + - sudo -u builduser bash -c 'git remote add aur ssh://aur@aur.archlinux.org/$CI_PROJECT_NAME.git' + - sudo -u builduser bash -c 'git fetch aur' script: - - git push aur master + - sudo -u builduser bash -c 'git push aur master' - sleep 30 yay_after: |