Simplify build workflow for non-root runner

Runner now executes as builder user, so no su/chown/chmod needed.
makepkg runs directly without permission workarounds.
This commit is contained in:
nevaforget 2026-04-01 16:57:00 +02:00
parent d69ef5ce44
commit bad7680b4c

View File

@ -19,7 +19,6 @@ jobs:
rm -rf repo rm -rf repo
git clone http://gitea:3000/nevaforget/moonarch-pkgbuilds.git repo git clone http://gitea:3000/nevaforget/moonarch-pkgbuilds.git repo
cd repo cd repo
git config --global --add safe.directory "$(pwd)"
CHANGED=$(git diff --name-only HEAD~1 HEAD | grep '/PKGBUILD$' | sed 's|/PKGBUILD||' || true) CHANGED=$(git diff --name-only HEAD~1 HEAD | grep '/PKGBUILD$' | sed 's|/PKGBUILD||' || true)
@ -30,14 +29,11 @@ jobs:
echo "Changed packages: $CHANGED" echo "Changed packages: $CHANGED"
chown -R builder:builder .
for pkg in $CHANGED; do for pkg in $CHANGED; do
echo "==> Building $pkg" echo "==> Building $pkg"
cd "$pkg" cd "$pkg"
# Build package as non-root user makepkg -sfd --noconfirm
su builder -c "BUILDDIR=. makepkg -sfd --noconfirm"
# Find the built package file # Find the built package file
PKG_FILE=$(ls -t *.pkg.tar.zst 2>/dev/null | head -1) PKG_FILE=$(ls -t *.pkg.tar.zst 2>/dev/null | head -1)