Push only the package files to the AUR

The AUR rejects repositories with subdirectories, so .forgejo cannot be pushed.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
Jonas Leder 2026-11-18 17:32:10 +01:00
commit 31f46cdf9a

View file

@ -53,6 +53,17 @@ jobs:
git commit -m "Update to ${latest_version}"
git push origin HEAD:master
fi
# also when nothing changed: a failed AUR push of an earlier run is retried, an up to date AUR is a no-op
git remote add aur ssh://aur@aur.archlinux.org/aptakube.git
GIT_SSH_COMMAND='ssh -i ~/.ssh/id_rsa_aur' git push --set-upstream aur HEAD:master
# The AUR rejects subdirectories (.forgejo), so the package files go to a separate clone of the AUR repo.
# Also when nothing changed: a failed AUR push of an earlier run is retried, an up to date AUR is a no-op.
export GIT_SSH_COMMAND='ssh -i ~/.ssh/id_rsa_aur'
git clone ssh://aur@aur.archlinux.org/aptakube.git /tmp/aur
cp PKGBUILD .SRCINFO update.sh .gitignore /tmp/aur/
cd /tmp/aur
git rm -q --ignore-unmatch .gitlab-ci.yml
git add -A
if git diff --cached --quiet; then
echo "AUR is up to date"
exit 0
fi
git commit -m "Update to ${pkgver}"
git push origin HEAD:master