GitHub Actions for Azure is now generally available

11월 13, 2019에 게시됨

Program Manager

GitHub Actions make it possible to create simple yet powerful workflows to automate software compilation and delivery integrated with GitHub. These actions, defined in YAML files, allow you to trigger an automated workflow process on any GitHub event, such as code commits, creation of Pull Requests or new GitHub Releases, and more.

As GitHub just announced the public availability of their Actions feature today, we’re announcing that the GitHub Actions for Azure are now generally available.

You can find all the GitHub Actions for Azure and their repositories listed on GitHub with documentation and sample templates to help you easily create workflows to build, test, package, release and deploy to Azure, following a push or pull request.

You can also use Azure starter templates to easily create GitHub CI/CD workflows targeting Azure to deploy your apps created with popular languages and frameworks including .NET, Node.js, Java, PHP, Ruby, or Python, in containers or running on any operating system.

Connect to Azure

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

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 the Azure WebApp (azure/webapps-deploy)and Azure Web App for Containers (azure/webapps-container-deploy) actions. You could also configure App settings and Connection Strings using the Azure App Service Settings (azure/appservice-settings) action.

Learn more about Azure App Service.

Deploy a serverless Function app

Streamline the deployment of your serverless applications to Azure Functions, an event-driven serverless compute platform, by bringing either your code using the Azure Functions action (azure/functions-action) or your custom container image using the Azure Functions for containers action (azure/functions-container-action) .

Learn more about Azure Functions.

Build and Deploy containerized Apps

For containerized apps (single- or multi-containers) use the Docker Login action (azure/docker-login) to create a complete workflow to build container images, push to a container registry (Docker Hub or Azure Container Registry), and then deploy the images to an Azure web app, Azure Function for Containers, or to Kubernetes.

Deploy to Kubernetes

We have released multiple actions and to help you connect to a Kubernetes cluster running on-premises or on any cloud (including Azure Kubernetes Service), 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 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 Helm 2, kustomize, or Kompose.

To deploy to a cluster on Azure Kubernetes Service (AKS), 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.

Deploy to Azure SQL or MySQL databases

We now have an action for Azure SQL Databases (azure/sql-action) that uses a connection string for authentication and DACPAC/SQL scripts to deploy to your Azure SQL Database.

If you would like to deploy to an Azure Database for MySQL database using MySQL scripts, use the MySQL action (azure/mysql-action) instead.

Trigger a run in Azure Pipelines

GitHub Actions make it easy to build, test, and deploy your code right from GitHub, but you can also use it to trigger external CI/CD tools and services, including Azure Pipelines. If your workflow requires an Azure Pipelines run for deployment to a specific Azure Pipelines environment, as an example, the Azure Pipelines (azure/pipelines) action will enable you to trigger this run as part of your Actions workflow.

Utility Actions

Finally, we also released an action for variable substitution Microsoft/variable-substitution, which enables you to parameterize the values in JSON, XML, or YAML files (including configuration files, manifests, and more) within a GitHub Action workflow.

More coming soon

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

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.