The ultimate CircleCI config for Terraform pull request workflow

Terraform is an extremely powerful tool, but the out-of-the-box workflow can lead to pitfalls such as forgetting to commit and push changes to manifest and terraform.tfstate files. Use this example CircleCI configuration for a rock-solid pull-request workflow for Terraform projects. The Workflow A project contributor creates a pull request with changes to terraform manifests. CircleCI runs a terraform plan and posts the diff as a comment in the pull request....

July 9, 2020

Log in to GitHub Docker registry with just a token

I recently worked on a project to push our private docker images to GitHub’s package registry. Our CI only had a GITHUB_TOKEN environment variable set, but docker login requires a username too. Rather than add a new environment variable to the build and an assumption that the username and token had to match, I used this snippet to derive the username from the token and log in to the registry....

April 27, 2020