nspawn/mkosi-definitions

Automated builds using Github Actions

shibumi opened this issue · 7 comments

I wonder if we could use Github Actions for building all images. Thoughts @Edu4rdSHL ?

Hi, @shibumi. I have considered this a long time ago, I have tried to build the images in a containerized environment, and sadly it doesn't work even when I give CAP_SYS_ADMIN, mkosi fails to attach the image to /dev/loopX. Actually, I need to build them on my host machine. But these aren't all the problems, I also need to install AUR packages for the builds, for example: zypper for OpenSuse images.

Update, there's a mkosi action that I'm looking into for building the images.

It's almost done, checking https://github.com/nspawn/mkosi-definitions/actions/runs/2008978944 everything is fine, exactly as it runs on my machine actually. Now I need to find a way to rsync the images to the server, shouldn't be hard I think.

Why does it run on your machine? can't you run it in the GitHub action VM?

The action of course runs on the Github actions infra, I'm talking about the current state, that's why I said "exactly as it runs on my machine actually" which means that the results are the same on both Github actions and my machine, not that the Github action runs on my machine. Not sure if that makes sense now.

Hello,

I think that it has been fixed. Now we have 3 different actions which work in the following way:

  • Release new images: it builds new images added to the repo, basically, any commit to the master branch that modifies a .default file will trigger it and only the modified .default images are built. The generated images are then synced to the server.
  • Rebuild Images: It will rebuild the images weekly, every Sunday at 00:00. The generated images are then synced to the server.
  • Pull Request testing: It builds the images for new .default files on pull requests, which will help us to validate them. It doesn't sync anything to the server.

What do you think?

Regards,
Ed

This is great. Thank you for your work. So nice seeing this project going forward ;)