Not long ago, a colleague brought to my attention that I was configuring Travis CI on new GitHub repos. They suggested I use GitHub Actions instead. I’d looked into Actions back when it was in beta, but didn’t delve too deeply into it because of some issues I found pretty early on. Plus, I’d been using Travis-CI for a bit now and didn’t have the bandwidth to learn another new thing at the time.

However, if GitHub Actions is as good as everyone says, it would be one less external service to deal with. This article is going to walk you through migrating your existing repository to GitHub Actions. And I’ll be sharing my findings along the way!

The Travis-CI Config

I’m going to use the Okta Maven Plugin for my repository. If you are a Java developer, it can get you set up with Okta in 30 seconds, check out the project’s readme. Even though I’m using a Java project, it’s possible to modify these steps for any project.

My original .travis.yml configures a simple matrix build. Matrix builds contain multiple jobs that run in parallel with different configurations. These can be as complex as you need; run a build on multiple operating systems, against different versions of tools, and with different environment variables. A matrix build that defines two operating systems, three environment variables, and two versions of Java would result in 12 individual builds (2 x 3 x 2).

My project expands into just two builds, one for each Java (8 and 11):

#java #okta #travis ci #github actions

Travis CI to GitHub Actions: What to Know About Migration
2.65 GEEK