This repo is forked from https://github.com/vifly/arch-build. For more technical details, refer to the original repo.
This project publish a docker image for building aur packages. You can use it like below:
docker run --rm \
-v ${workspace}:/workspace \
-w /workspace \
-e PREINSTALL_PKGS=${packages that need to be installed before building} \
ghcr.io/chenxiex/arch-build/build-aur-action-image:latest ${packages that need to be built}${workspace} is the output path. Not only the specified packages but also the dependencies in aur will be there.
The same image can also build non-AUR packages from local PKGBUILDs:
docker run --rm \
-v ${workspace}:/workspace \
-w /workspace \
-e BUILD_MODE=local \
ghcr.io/chenxiex/arch-build/build-aur-action-image:latest packages/${pkgname}Non-AUR packages live under packages/<pkgname>/. Each package directory must contain a PKGBUILD, and may also contain its own nvchecker.toml, old_ver.json, and new_ver.json.
The build image passes --mflags=--skippgpcheck to pikaur by default, so makepkg skips PGP signature checks for unattended CI builds. Set SKIP_PGP_CHECK=false to enable PGP checks again.
docker run --rm \
-v ${workspace}:/workspace \
-w /workspace \
-e BUILD_MODE=local \
-e SKIP_PGP_CHECK=false \
ghcr.io/chenxiex/arch-build/build-aur-action-image:latest packages/hyprland-gitExample:
packages/
`-- example/
|-- PKGBUILD
|-- nvchecker.toml
|-- old_ver.json
`-- new_ver.json
nvchecker.toml is optional. Packages without it are built only when files under their own packages/<pkgname>/ directory are pushed, or when they are explicitly selected from workflow_dispatch.
If a non-AUR package has nvchecker.toml, any successful build of that package updates its version records, no matter whether the build was triggered by nvchecker, a push touching that package directory, or a manual dispatch.
Package-local nvchecker files should keep version records beside the config:
[__config__]
oldver = "old_ver.json"
newver = "new_ver.json"
[example]
source = "github"
github = "owner/repo"
use_latest_release = trueThe packages are located at Cloudflare R2 and GitHub releases, choose one of you like.
Add the following code snippet to your /etc/pacman.conf (choose one):
# Download from Cloudflare R2
[anlor]
Server = https://archrepo.anlor.top
or
# Download from GitHub releases
[anlor]
Server = https://github.com/chenxiex/arch-build/releases/latest/download
And import my pubkey:
wget -O /tmp/anlor.asc 'https://archrepo.anlor.top/anlor.asc' && sudo pacman-key --add /tmp/anlor.asc
sudo pacman-key --lsign-key chenxiex@outlook.comThen, run sudo pacman -Syu to update the repository and upgrade the system.
Now you can use sudo pacman -S <pkg_name> to install packages from my repository.
Unlike the upstream repo, this repo use nvchecker to build only the packages that need update. The packages to build is defined in nvchecker.toml. To force rebuilding a package, install nvchecker and run:
nvtake -c nvchecker/nvchecker.toml PACKAGE_NAME=none
then commit and push.
For non-AUR packages, use GitHub Actions workflow_dispatch with package=<pkgname> to build a specific directory under packages/. Leave package empty to use automatic detection.