ci(aur): attach to master after clone to avoid detached HEAD

aur.archlinux.org stopped advertising the HEAD symref around 2026-04-22
(`git ls-remote --symref` returns HEAD as a raw SHA, no 'ref:' line).
Fresh clones therefore land in detached HEAD, commits do not land on
any branch, and 'git push origin master' fails with:

  error: src refspec master does not match any

Every AUR publish run since has failed for this reason. Checking out
master explicitly after clone attaches the working copy to the branch
the push targets. refs/heads/master is still present on the remote, so
no other changes are needed.
This commit is contained in:
Razvan Dimescu
2026-04-24 17:57:51 +03:00
parent 93f0ea7501
commit d090e049ec

View File

@@ -126,6 +126,10 @@ jobs:
# ssh://aur@aur.archlinux.org/<package-name>.git # ssh://aur@aur.archlinux.org/<package-name>.git
git clone ssh://aur@aur.archlinux.org/$AUR_PKGNAME.git aur-repo git clone ssh://aur@aur.archlinux.org/$AUR_PKGNAME.git aur-repo
# AUR's git server no longer advertises HEAD's symref, so clone
# lands in detached HEAD. Attach to master before committing.
git -C aur-repo checkout master
cp PKGBUILD aur-repo/ cp PKGBUILD aur-repo/
cd aur-repo cd aur-repo