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.
The Quarterly rebuild workflow rebuilds every AUR package in nvchecker/nvchecker.toml
and every local package with a packages/<pkgname>/nvchecker.toml on January, April,
July, and October 1. Run it manually from the Actions tab using Run workflow.
It checks versions in isolated, empty records and replaces the repository's version
records only after all builds succeed, removing entries for packages no longer configured.
Quarterly uploads use rebuild: 'true' on create-db-and-upload-action. They generate
the repository only from the current build artifacts (including collected dependency
and split packages) and files under static/, without downloading or merging remote
packages. Uploading with rclone sync deletes remote files absent from this rebuilt
repository, so removal of untracked packages does not depend on R2 object expiration.
Disable any previously configured R2 object expiration rule for this repository;
unchanged files are no longer forcibly reuploaded to refresh their timestamps.
An empty rebuild is rejected before uploading.
Regular uploads keep the default rebuild: 'false' behavior: merge packages from the
remote repository before syncing, and reuse existing signatures for unchanged
packages. If a restored package has no signature, one is generated when signing is
enabled.