Use cases for Github Actions
Here are a couple of examples where I leveraged Github Actions to glue such applications:
Publishing this blog with HUGO
Frustrated with jekyll ndependency hell I decided to swith to HUGO. It’s fast, really fast. And does whatever I need it to do.
Each time I push commits to this repository, this repository is checked out, hugo generates the static website and that website is push to gh-pages for delivery.
PS: Whenever azure blob-storage (or static websites) gets proper support (no DNS flattening hacks) for hosting websites from a storage account I might consider moving the hosting over there…
Releasing on central
Each time a commit is pushed to this repository, a build (and test) is triggered. Whenever a tag is pushed, that tag is released.
Managing cloud infrastructure
When you have automated the provisioning of your cloud infrastructure with a tool such as Terraform you may want to automate the roll-out as well. Careful, as this currently requires some annoying “in between” steps to avoid big bang deployments. You probably do not want to replace an entire pool of nodes by simply wiping it and putting another pool in place (but do it in a phased approach.
So, each time a PR is created (or updated) we run terraform plan to validate the output and add a comment to the PR displaying the output. When the PR is merged into master you we run terraform apply (and add a comment to the commit with the output).
PS: In this example we have multiple terraform modules, which are all planned/applied via a matrix and terraform’s -chdir parameter.