Use GitHub Actions to connect to Azure
Learn how to use Azure Login action with either Azure PowerShell action or Azure CLI action to interact with your Azure resources.
To use Azure PowerShell or Azure CLI in a GitHub Actions workflow, you need to first log in with the Azure Login action action.
The Azure Login action supports different ways of authenticating with Azure:
- Sign in with OpenID Connect using a Microsoft Entra application or a user-assigned managed identity
- Sign in with a managed identity configured on an Azure virtual machine (Only available for self-hosted GitHub runners)
- Sign in with a service principal and secret (Not recommended)
By default, the Azure Login action logs in with the Azure CLI and sets up the GitHub Actions runner environment for Azure CLI. You can use Azure PowerShell with enable-AzPSSession
property of the Azure Login action. This property sets up the GitHub Actions runner environment with the Azure PowerShell module.
You can also use the Azure Login action to connect to public or sovereign clouds including Azure Government and Azure Stack Hub.
Connect with other Azure services
The following articles provide details on connecting from GitHub to Azure and other services.
Service | Tutorial |
---|---|
Microsoft Entra ID | Sign in to GitHub Enterprise with Microsoft Entra ID (single sign-on) |
Power BI | Connect Power BI with GitHub |
GitHub Connectors | GitHub connector for Azure Logic Apps, Power Automate, and Power Apps |
Azure Databricks | Use GitHub as version control for notebooks |
Feedback
https://aka.ms/ContentUserFeedback.
Coming soon: Throughout 2024 we will be phasing out GitHub Issues as the feedback mechanism for content and replacing it with a new feedback system. For more information see:Submit and view feedback for