I’ve been a big fan of GitHub Actions since last year’s Universe (read the post on building docs with them). As a matter of fact, I was such a fan that I moved my blog publishing process entirely to GitHub Actions and GitHub Pages. Recently, GitHub announced that the Actions engine is changing, which makes workflow management much easier - still in private beta, though.
Recently I got an invite to try out the new functionality, though, so I thought I’d write up how I updated the blog publishing workflow to the new experience!
Making the change
The first step is going to the repository that already has GitHub actions provisioned. Navigating to the Actions tab no longer shows the V1 workflows (they still work, by the way) and instead give you options to create new workflows. We’ll do just that - we’ll no longer rely on HCL-formatted definitions and instead use YAML (see documentation for more details).
Now, this might be a bit scary because it might seem like everything needs to be started from scratch. The folks at GitHub, however, have thought this through and have created a migration path. To get started, we need to download the migration scripts.
Once the script completes and the changes are checked in, all I needed to do is create a pull request to
When the PR is merged, the Actions tab will contain the list of executions in the new format:
From now on, every valid commit will perform a GitHub Actions execution through the new workflow. All-in-all, it took me less than 5 minutes to make the transition. Talk about efficiency!
There is one thing that I also had to eliminate - I no longer need to check the branch in my script. This is now controlled with the workflow YAML:
Have any thoughts? Let me know on Twitter!