ci(builder): pass build directory to makepkg command
The CI workflow for building applications has been updated to correctly manage the build environment. Previously, makepkg was run without explicitly defining where its output should go, which could lead to unpredictable file placement or conflicts. This change ensures that a dedicated temporary directory is used as the build output location. - Explicitly create and use a makepkg directory - Pass BUILDDIR variable to makepkg command
This commit is contained in:
@@ -210,12 +210,13 @@ jobs:
|
|||||||
|
|
||||||
BUILD_ROOT="$(mktemp -d)"
|
BUILD_ROOT="$(mktemp -d)"
|
||||||
cp -a . "$BUILD_ROOT/source"
|
cp -a . "$BUILD_ROOT/source"
|
||||||
|
mkdir -p "$BUILD_ROOT/makepkg"
|
||||||
|
|
||||||
useradd --create-home builder
|
useradd --create-home builder
|
||||||
chown -R builder:builder "$BUILD_ROOT"
|
chown -R builder:builder "$BUILD_ROOT"
|
||||||
|
|
||||||
runuser -u builder -- \
|
runuser -u builder -- \
|
||||||
bash -lc "cd '$BUILD_ROOT/source' && makepkg --cleanbuild --noconfirm"
|
bash -lc "cd '$BUILD_ROOT/source' && BUILDDIR='$BUILD_ROOT/makepkg' makepkg --cleanbuild --noconfirm"
|
||||||
|
|
||||||
cp "$BUILD_ROOT"/source/*.pkg.tar.zst arch-output/
|
cp "$BUILD_ROOT"/source/*.pkg.tar.zst arch-output/
|
||||||
chmod 0644 arch-output/*.pkg.tar.zst
|
chmod 0644 arch-output/*.pkg.tar.zst
|
||||||
|
|||||||
Reference in New Issue
Block a user