The first step is to create an Azure Service Principal account. You'll need the following:
az ad sp create-for-rbac --name "CICD" --role contributor --scopes /subscriptions/$AZURE_SUBSCRIPTION_ID --sdk-authReplace "$AZURE_SUBSCRIPTION_ID" with the id from step 1.
Next, in your GitHub repository, add the output from the Service Principal (should be a JSON blob) as an Action Secret. You do this in your repository Settings.
Finally, create a GitHub workflow file by going to the "Actions" tab. Make sure you use the Azure login action:
- uses: azure/login@v1
with:
creds: ${{ secrets.AZURE_CREDENTIALS }}
The full running example is in the sample GitHub repository which you can use to get started, or use the YouTube video for a detailed walk-through!
All of the steps are also covered in this short video:
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.