Code description
This code snippet shows how to use deploy Azure Automation PowerShell runbooks using GitHub Actions workflow.
Automation Runbooks can be used to run scripts regularly including PowerShell workflows, Python scripts, etc.
If you have multiple scripts to deploy, you can create a PowerShell script file to deploy.
The following assumptions are made:
The PowerShell runbook script (myrunbook.ps1) is located in the specified folder (scripts/runbooks).
The runbook is PowerShell type.
GitHub Actions secrets are setup to use OIDC to authenticate with Azure.
The resource will be deployed into automation account named
myautomationaccount
under resource group 'rg
'.