Provisioning Azure Virtual Machines via GitHub Actions
Refer to Quickstart: Deploy Bicep files by using GitHub Actions for settings
- Fork ks6088ts-labs/azure-vm-provisioner
- Generate deployment credentials
az ad sp create-for-rbac \
--name "<your application name>" \
--role contributor \
--scopes "/subscriptions/<your subscriptionId>/resourceGroups/<your resource group name>" \
--sdk-auth
{
"clientId": "<GUID>",
"clientSecret": "<GUID>",
"subscriptionId": "<GUID>",
"tenantId": "<GUID>",
(...)
}
- Configure the GitHub secrets Register the following secrets
AZURE_CREDENTIALS
: The entire JSON output from the Azure CLI command described in step1AZURE_SUBSCRIPTION
: Your subscription ID
- Run GitHub Actions Go to GitHub Actions page, fill in parameters and run a job