Resolving steps.plan.outputs.* returns Empty Issue with hashicorp/setup-terraform@v3

A quick blog post to include the fix/what is needed to resolve steps.plan.outputs.* is empty when using GitHub Action hashicorp/setup-terraform@v3 I recently came across a situation while working with the hashicorp/setup-terraform@v3 GitHub Action. I wanted to make use of steps.plan.outputs.stdout to display the Terraform Plan, but I noticed that the output was consistently empty. Even … Read more

Displaying Terraform Plans in GitHub PRs with GitHub Actions

Screenshot of a GitHub pull request comment displaying a series of successful Terraform-related tasks. The comment includes detailed output from a Terraform Plan, indicating that various Terraform operations, such as formatting and validation, have completed successfully, along with a summary of the planned infrastructure changes

In this blog post, I’ll show you a cool trick – how to share your Terraform Plan right in the comments of your GitHub Pull Request using GitHub Actions. This comes with some handy benefits for your workflow: How to achieve this As part of my Action workflow, I have used a step that is … Read more

GitHub Action seeing dockerfile but no additional files or folders in the same location

Recently I was using the task docker/build-push-action@v2 to build and push docker image to Azure Container Registry, I encountered an error while using the task. The error specifically pointed to a failure referenced below: Upon investigation, I discovered that the issue was rooted in the absence of the ‘azure-vote’ folder in the same location as … Read more

Unlocking Manual Workflow Execution in GitHub Actions: A Quick Fix

Screenshot from GitHub Actions showing the workflow tab with the option to run the workflow. The image highlights the 'Run workflow' button, indicating that the workflow can be manually triggered. This option is available, allowing users to initiate the workflow process directly from the GitHub Actions interface.

If you’re working with CI/CD pipelines and GitHub Action workflows, there might be instances where you need to manually run a workflow. However, you might have noticed that when you attempt to do this through the portal, you realize that there’s no option available for manual execution. In this blog post, I’ll provide a quick … Read more

If, elseif or else in GitHub Actions

One of the lesser-explored yet incredibly powerful features of GitHub Actions is its support for conditional expressions. In this blog post, we’ll dive into the world of conditional expressions, specifically focusing on the ‘if,’ ‘elseif,’ and ‘else’ expressions, and explore how they can be leveraged to create more dynamic and efficient workflows. I did write … Read more

How to use GitHub Actions environment variables

In this blog, we will explore how to use environment variables in GitHub Actions, including how to create and use them in your workflows. Environment variables are an essential part of any software development process, and GitHub Actions makes it easy to manage them. Environment variables are values that are stored outside of your source … Read more

Using GitHub Actions variables as Terraform variables

In Terraform you can use variables to make your code more dynamic and reusable. You can use variables to pass in values from the command line, from a file, or from environment variables. In this blog post I will show you how to use GitHub Actions variables as Terraform variables. GitHub Actions Variables GitHub Actions … Read more

GitHub Action Workflow hashicorp/setup-terraform@v2 ERROR: Please run ‘az login’ to setup accountGitHub Action Workflow hashicorp/setup-terraform@v2 error:

A quick blog post on assisting with a couple of errors I came across when using workflow hashicorp/setup-terraform@v2 – this also remediates hashicorp/setup-terraform@v1 also. Two errors found, relating to the same fix: First error: Second error: The fix As detailed here in standard terraform usage is: Within my GitHub action, here is my remediation example … Read more

Yarn Build and deploy image to Azure Container Registry using GitHub Actions

In this blog post I will show you can use a GitHub Action to run Yarn build and deploy a container image to Azure Container Registry. Prior to continuing with this blog, please review this post in relation to setting up the Azure Container registry and creating the three secrets required to be included in … Read more

Storing and retrieving secrets in Azure Key Vault with GitHub Actions

Screenshot of a GitHub Actions job creating resource groups using secret values. The image shows the az CLI commands in the workflow logs, where resource groups are being created with values sourced from GitHub Secrets. It includes the commands with hashed or masked secret values, indicating that the resource groups are being configured securely using the secrets

Using GitHub Actions and wanting to store secrets security while utilising Azure? In this blog post I will be showing how you can create and store secrets in Azure Key Vault and retrieve them to be used as part of your GitHub Actions. I wrote a bash script to achieve this as Azure/get-keyvault-secrets@v1 has been … Read more