diff --git a/.gitea/workflows/app_builder.yaml b/.gitea/workflows/app_builder.yaml index a3af6f4..b1b327c 100644 --- a/.gitea/workflows/app_builder.yaml +++ b/.gitea/workflows/app_builder.yaml @@ -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