Hacker News new | ask | show | jobs
by louib 2376 days ago
I had to setup CI for a GitHub open source project recently, and decided to give GitHub Actions a try. I have to say it's pretty nice to have the CI directly handled by GH (GitLab has been doing it for years, I know...). I hope it's gonna help some open source projects to easily add CI validations to their PR workflow.

That being said, there was only Ubuntu images for the Linux builds, and I'm not aware of a way to run custom containers at the moment.

2 comments

Most of the Actions are actually custom containers. So to run your own code you can just make an action, which isn't that complex.
PM for GitHub Actions here. I wouldn't suggest that you build an action to run a build within a container. We offer container support for workflow runs which should be suitable for this. (Either by specifying the `jobs.<job-id>.container` or by using `docker run ...`)

Actions themselves are meant to support the workflow and distill a set of complex steps into something that can be done in a single workflow command. (For example, download and set up a new version of a Java JDK.) They're meant to be used as steps in many peoples workflows, instead of executing a single workflow.

The actions themselves can be built as either a container, which is self-contained, or as JavaScript. I often recommend the latter, since that will work cross platform (containers only work for people who are using workflows running on Linux).

Indeed, GitHub Actions only has ubuntu virtual machines, but you can run a custom container with the `jobs.<job-id>.container` specifier.
Actually it' s possible to do react native builds on OS X as well: https://medium.com/@jonnyburger/first-look-using-github-acti...

We've been experimenting with this and are using this to add some CI to our react native frontend.

Yes, I apologize for not being clear: our Linux virtual machines only run Ubuntu. (We also offer macOS and Windows virtual machines.)