refactor(ci): Streamline package building workflow
publish / Build and publish Arch package (release) Failing after 1m23s
publish / publish-tauri (nsis, , windows-latest, windows-x86_64) (release) Canceled after 0s
publish / publish-tauri (appimage, 1, ubuntu-22.04, linux-x86_64) (release) Canceled after 6m6s

The CI/CD pipeline has been significantly refactored to improve efficiency and reduce dependency on Docker containers during the build process. The core logic now uses temporary directories and direct execution commands, streamlining both the packaging of tarballs and the generation of the repository database. This change results in a faster and more robust build environment within the runner.

- Removed reliance on docker run for package building
- Simplified the mechanism for updating the pacman repository database
- Added necessary dependencies to base system installation steps
This commit is contained in:
2026-07-23 17:03:57 +02:00
parent a1325d85e8
commit f7793bc908
+19 -20
View File
@@ -175,7 +175,7 @@ jobs:
working-directory: /
run: |
pacman -Syu --noconfirm
pacman -S --needed --noconfirm nodejs npm git docker
pacman -S --needed --noconfirm nodejs npm git
- uses: actions/checkout@v5
with:
@@ -201,30 +201,29 @@ jobs:
- name: Build pkg.tar.zst with PKGBUILD
run: |
pacman -S --needed --noconfirm \
base-devel git nodejs npm rust \
webkit2gtk-4.1 gtk3 hicolor-icon-theme \
libappindicator-gtk3 librsvg xdotool
mkdir -p arch-output
docker run --rm \
-v "$PWD:/source:ro" \
-v "$PWD/arch-output:/output" \
archlinux:base-devel bash -lc '
pacman -Syu --noconfirm git nodejs npm rust webkit2gtk-4.1 gtk3 hicolor-icon-theme libappindicator-gtk3 librsvg xdotool &&
useradd --create-home builder &&
cp -a /source /build &&
chown -R builder:builder /build &&
runuser -u builder -- bash -lc "cd /build && makepkg --cleanbuild --noconfirm" &&
cp /build/*.pkg.tar.zst /output/ &&
chmod 0644 /output/*.pkg.tar.zst
'
BUILD_ROOT="$(mktemp -d)"
cp -a . "$BUILD_ROOT/source"
useradd --create-home builder
chown -R builder:builder "$BUILD_ROOT/source"
runuser -u builder -- \
bash -lc "cd '$BUILD_ROOT/source' && makepkg --cleanbuild --noconfirm"
cp "$BUILD_ROOT"/source/*.pkg.tar.zst arch-output/
chmod 0644 arch-output/*.pkg.tar.zst
- name: Update pacman repository database
run: |
mkdir -p arch-repo
docker run --rm \
-v "$PWD/arch-output:/packages:ro" \
-v "$PWD/arch-repo:/repo" \
archlinux:base-devel bash -lc '
cd /repo &&
repo-add gitty.db.tar.gz /packages/*.pkg.tar.zst
'
repo-add arch-repo/gitty.db.tar.gz arch-output/*.pkg.tar.zst
- name: Upload package and repository database to CDN
working-directory: GitLite/cicd_tool