Integrating Flathub releases with my release pipeline

I have a release pipeline with multiple jobs releasing to e.g. Github Releases, AUR, or NPM.

Now I would like to integrate Flathub with the same pipeline. The manual process goes like this:

  • I push a tag, and build a new release
  • Then I manually update my Flathub repo with the new version and hash
  • I push to a branch, and open a PR
  • I wait ~10-15 minutes for the build to finish
  • I merge the PR manually

I can automate all of it up to the point where I wait for the PR build. How do you guys handle it and are there any recommended ways of handling that? I can’t think of anything better than a job that runs every 5 minutes and polls the repo for open PRs to merge, but obviously that’s ugly.

A major roadblock is that Github won’t let you receive webhooks from a repo you don’t have admin access to, so a true event-driven pipeline is off the table here.

Hi,

I did set up auto merge for flathub-beta a while ago

E.g.

  • I added a special label beta-update to the pr as a filter so only specific PRs get auto merged
  • Take care to not auto merge PRs from untrusted forks/users
  • Usually users from forks cannot freely decide about pr labels
  • This workflow checks the author of the done comment is done by flathub bots account id not anyone trying to fake that entity
  • The flathub bot comment is usually some minutes after the commit status, but good enough for full automation

I cannot say if this is good solution, but merging possible daily beta PRs by hand is not manageable.