Skip to content

devcode1981/actions

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

GitHub Actions for deploying to Azure

GitHub Actions gives you the flexibility to build an automated software development lifecycle workflow.

With GitHub Actions for Azure you can create workflows that you can set up in your repository to build, test, package, release and deploy to Azure. Learn more about all other integrations with Azure.

Get started today with a free Azure account!

To easily create GitHub CI/CD workflows targeting Azure, use our Azure starter templates to deploy your apps created with popular languages and frameworks such as .NET, Node.js, Java, PHP, Ruby or Python, in containers or running on any operating system. Also the individual Action repos have a sample workflow included in their Readme file to help you quickly get started.

Please try out the GitHub Actions for Azure and share your feedback via Twitter on @Azure. If you encounter a problem, please open an issue on the GitHub repository for the specific action.

GitHub Actions for Azure

Connect to Azure

  • Azure login(azure/login) action can be used to authenticate to your Azure subscription using a service principal.
  • Azure CLI (azure/cli) action sets up the GitHub Action runner environment with the latest (or any user-specified) version of the Azure CLI. You can then run Azure CLI scripts to create and manage any Azure resource.

Refer to starter templates for examples.

Get Secrets from Azure Key Vault

With the Get KeyVault Secrets(azure/get-keyvault-secrets) action, you can fetch one or more secrets from an Azure keyvault instance and consume in your GitHub Action workflows.

Secrets fetched will be set as outputs of the keyvault action step and also as environment variables. All the variables are automatically masked if printed to the console or to logs.

Deploy a Web app

Azure App Service is a managed platform for deploying and scaling web applications. You can easily deploy your web app to Azure App Service with

You could also configure App settings and Connection Strings using the

Learn more about deploying web applications to Azure using GitHub Actions from the documentation of respective actions and starter templates.

Deploy a serverless app

Streamline the deployment of your serverless applications to Azure Functions, an event-driven serverless compute platform, by using the below actions and starter templates.

Build & Deploy containerized apps

For containerized apps (single- or multi-containers) to create a complete workflow

  • use Docker login(azure/docker-login) to build container images, push to a container registry (Docker Hub or Azure Container Registry) and then deploy the images to a Azure Web App or Azure Function for Containers, or to Kubernetes.
  • use Deploy to Azure Container Instances(azure/aci-deploy) to deploy your container images to Azure Container Instances.

Deploy to Kubernetes

We have released multiple actions to help you connect to a Kubernetes cluster running on-premises or on any cloud (including Azure Kubernetes Service – AKS), bake and deploy manifests, substitute artifacts, check rollout status, and handle secrets within the cluster.

  • Kubectl tool installer(azure/setup-kubectl): Installs a specific version of kubectl on the runner.
  • Kubernetes set context(azure/k8s-set-context): Used for setting the target Kubernetes cluster context which will be used by other actions or run any kubectl commands.
  • AKS set context(azure/aks-set-context): Used for setting the target Azure Kubernetes Service cluster context .
  • Kubernetes create secret(azure/k8s-create-secret): Create a generic secret or docker-registry secret in the Kubernetes cluster.
  • Kubernetes deploy(azure/k8s-deploy): Use this to bake and deploy manifests to Kubernetes clusters.
  • Setup Helm(azure/setup-helm): Install a specific version of Helm binary on the runner.
  • Kubernetes bake(azure/k8s-bake): Use this action to bake manifest file to be used for deployments using helm2, kustomize or kompose.

To deploy to a cluster on Azure Kubernetes Service, you could use azure/aks-set-context to communicate with the AKS cluster, and then use azure/k8s-create-secret to create a pull image secret and finally use the azure/k8s-deploy to deploy the manifest files.

Refer to starter templates for more examples.

Deploy to databases

We now have actions for database deployments

  • Azure SQL database(azure/sql-action) that uses a connection string for authentication and DACPAC/SQL scripts to deploy to your Azure SQL database.
  • Azure MySQL action(azure/mysql-action) if you would like to deploy to an Azure MySQL database using MySQL scripts.

Refer to starter templates for examples.

Trigger a run in Azure Pipelines

While GitHub Actions makes it easy to build, test, and deploy your code right from GitHub, you can also use it to trigger external CI/CD tools and services. For example, you could use GitHub Actions for Continuous Integration, and Azure Pipelines for Continuous Delivery to leverage features like Environments and deep integration with Kubernetes.

  • Azure Pipelines(azure/pipelines) action enables you to trigger an Azure Pipelines run as part of your Actions workflow.

Refer to starter templates for examples.

Utility Actions

  • variable substitution(Microsoft/variable-substitution) action enables you to parameterize the values in JSON, XML or YAML files (including configuration files, manifests, etc) within a GitHub Action workflow.

Refer to starter templates for examples.

More coming soon!

We will continue improving upon our available set of GitHub Actions, and will release new ones to cover more Azure services.

Contributing

This project welcomes contributions and suggestions. Most contributions require you to agree to a Contributor License Agreement (CLA) declaring that you have the right to, and actually do, grant us the rights to use your contribution. For details, visit https://cla.opensource.microsoft.com.

When you submit a pull request, a CLA bot will automatically determine whether you need to provide a CLA and decorate the PR appropriately (e.g., status check, comment). Simply follow the instructions provided by the bot. You will only need to do this once across all repos using our CLA.

This project has adopted the Microsoft Open Source Code of Conduct. For more information see the Code of Conduct FAQ or contact opencode@microsoft.com with any additional questions or comments.

About

Automate your GitHub workflows using Azure Actions

Resources

License

Code of conduct

Security policy

Stars

Watchers

Forks

Packages

No packages published

Languages

  • HTML 61.6%
  • TypeScript 19.5%
  • JavaScript 18.9%