Enhancing GitHub Actions workflows
To build our services, we must create reusable workflows. First, let’s configure the variables and secrets that are needed by these workflows.
Configuring variables and secrets
We’ve configured variables and secrets using az pipeline config previously. if you need more customization, you might need to set these values yourself. You’ve already seen how to access the repository secrets and variables with the GitHub portal. Now, let’s add these to secrets:
AZURE_TENANT_IDAZURE_SUBSCRIPTION_IDAZURE_CLIENT_ID
To get the tenant ID, use the Azure CLI:
az account show --query tenantId -o tsv
az account show returns JSON information about the logged-in Azure account. With the JSONPath --query tenantId query, the Microsoft Entra tenant ID is returned. -o tsv returns the result in tab-separated values. Set the returned value with the AZURE_TENANT_ID repository secret.
The subscription ID can...