Adding validation steps to the workflow
Each action in your workflow can be a GitHub Action, which is created by someone else and published in the public marketplace, and so there is already an action that allows you to run Azure CLI commands. This will allow you to run the necessary commands to validate and deploy your template.
Adding an Azure CLI action to the workflow
The first thing you need to run the Azure CLI command is an action to log in to Azure. So go ahead and replace the Getting started
command with the azure/login
command:
- name: Azure Login uses: azure/login@v1 with: creds: ${{ secrets.AZURE_CREDENTIALS }}
Now you can add an Azure CLI action to create your resource group and validate your template:
- name: Azure CLI script uses: azure/CLI@v1 with: &...