You are not logged in.
I am maintaining github-actions-bin and we are attempting to automate this package update using GitHub Actions. But it requires a .github sub-directory. Because of this, we cannot push it.
https://github.com/ioquatix/github-actions-bin
When we try to push the automatically generated update:
Enumerating objects: 24, done.
Counting objects: 100% (24/24), done.
Delta compression using up to 8 threads
Compressing objects: 100% (17/17), done.
Writing objects: 100% (21/21), 4.65 KiB | 2.32 MiB/s, done.
Total 21 (delta 11), reused 0 (delta 0), pack-reused 0
remote: Checking connectivity: 21, done.
remote: error: The following error occurred when parsing commit
remote: error: d89ba824e3bfd64f8d12e86857da42c372498712:
remote: error: the repository must not contain subdirectories
remote: error: hook declined to update refs/heads/master
To ssh://aur.archlinux.org/github-actions-bin.git
! [remote rejected] master -> master (hook declined)
error: failed to push some refs to 'ssh://aur.archlinux.org/github-actions-bin.git'
Would it make sense to relax this requirement so we can have a consistent master branch? Or is there some other way we can solve this issue?
Thanks!
Offline
I don't see any reference to this .github directory. It only has one file. Can't you put the file in the root folder of the repository and generate the .github folder in the PKGBUILD?
Offline
GitHub Actions needs the file to be in a specific place, i.e. in `.github/workflows`. It also AFAIK needs to be on the master branch. It's not needed by pacman, but it's needed by GitHub which runs essentially a cron job to check the latest release, and commit an update to the package. The next step is for GitHub Actions to push he package to AUR automatically.
Offline
ioquatix wants to automatically push the repository to the AUR when it is changed on github using the github actions. To enable github actions, its configuration must be in the .github directory. It would be possible to filter the branch, but then the commit ids would be different between the github and aur repositories.
| alias CUTF='LANG=en_XX.UTF-8@POSIX ' |
Online
ioquatix wants to automatically push the repository to the AUR when it is changed on github using the github actions. To enable github actions, its configuration must be in the .github directory. It would be possible to filter the branch, but then the commit ids would be different between the github and aur repositories.
Oh, I see.
Last edited by Awebb (2021-04-28 07:34:51)
Offline
Subfolders in the AUR git repos are not supported... AFAIR from past discussions in this forum, but wait for a dev/TU to comment.
Offline
Or is there some other way we can solve this issue?
You could try using the "aurpublish" package and storing the PKGBUILD in a subdirectory too. aurpublish will use git subtrees to split out one subdirectory as a new repo and push it to the AUR -- the AUR won't contain any files in github, other than the ones in the per-package subdirectory.
Managing AUR repos The Right Way -- aurpublish (now a standalone tool)
Offline
> You could try using the "aurpublish" package and storing the PKGBUILD in a subdirectory too. aurpublish will use git subtrees to split out one subdirectory as a new repo and push it to the AUR -- the AUR won't contain any files in github, other than the ones in the per-package subdirectory.
It sounds tricky to automate from GH Actions. But I will explore it as an option. I understand the desire to keep AUR simple. It doesn't really make sense that it should receive GH configuration files. I'm just at a bit of a loss as to how I can do this and keep it simple for everyone (maintainers, etc). For a lot of software, it's very similar: A GH repo with automatic hooks which tests the updated package, push to AUR on success. I would like to use this more going forward if possible.
Offline
Other options include:
cloning the AUR repo, copying over the PKGBUILD + .SRCINFO, and committing / pushing
implementing the actual upload part of aurpublish yourself without minor safety rails:
git subtree push -P "${package}" aur@aur.archlinux.org:${pkgbase}.git master
Managing AUR repos The Right Way -- aurpublish (now a standalone tool)
Offline
Ah those are good options to consider, thanks.
Offline
The aurpublish script is pretty simple to use on its own FWIW, you don't need to install it via an Arch package in your GH Actions -- just clone https://github.com/eli-schwartz/aurpublish/ and run it.
But you could also trivially hardcode the names of the packages you're uploading, so YMMV.
...
If you do the copying-PKGBUILD-over-and-pushing then syncing commit messages/history becomes quite awkward, this is one of the advantages of aurpublish -- since it uses git-subtree, the commit history of the directory containing the PKGBUILD is preserved.
Managing AUR repos The Right Way -- aurpublish (now a standalone tool)
Offline