Add calbuilder user
This commit is contained in:
parent
5149d0a578
commit
2b2fd20528
10
pkgbuild.sh
10
pkgbuild.sh
|
@ -1,19 +1,23 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
pacman -Syu --noconfirm --needed base-devel
|
||||
|
||||
useradd calbuilder -m
|
||||
echo "calbuilder ALL=(ALL) NOPASSWD: ALL" >> /etc/sudoers
|
||||
visudo -c
|
||||
chmod -R a+rw .
|
||||
|
||||
baseDir="$PWD"
|
||||
cd "${INPUT_PKGDIR:-.}"
|
||||
oldFiles=$(find -H "$PWD")
|
||||
|
||||
sudo -H -u nobody makepkg --syncdeps --noconfirm
|
||||
sudo -H -u calbuilder makepkg --syncdeps --noconfirm
|
||||
|
||||
sudo -u nobody makepkg --printsrcinfo > .SRCINFO
|
||||
sudo -u calbuilder makepkg --printsrcinfo > .SRCINFO
|
||||
echo "::set-output name=srcInfo::.SRCINFO"
|
||||
sudo mv .SRCINFO /github/workspace
|
||||
|
||||
pkgFile=$(sudo -u nobody makepkg --packagelist)
|
||||
pkgFile=$(sudo -u calbuilder makepkg --packagelist)
|
||||
relPkgFile="$(realpath --relative-base="$baseDir" "$pkgFile")"
|
||||
echo "::set-output name=pkgFile::$relPkgFile"
|
||||
sudo mv "$pkgFile" /github/workspace
|
||||
|
|
Loading…
Reference in New Issue