Skip to content

Commit 10a87dd

Browse files
committed
use the azure cli action instead
1 parent 5e9f098 commit 10a87dd

File tree

1 file changed

+9
-7
lines changed

1 file changed

+9
-7
lines changed

articles/azure-resource-manager/templates/deploy-github-actions.md

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,14 @@
22
title: Deploy Resource Manager templates by using GitHub Actions
33
description: Describes how to deploy Azure Resource Manager templates by using GitHub Actions.
44
ms.topic: conceptual
5-
ms.date: 05/01/2020
5+
ms.date: 05/05/2020
66
---
77

88
# Deploy Azure Resource Manager templates by using GitHub Actions
99

10-
[GitHub Actions](https://help.github.com/en/actions) enables you to create custom software development life-cycle workflows directly in your GitHub repository where your Azure Resource Manager (ARM) templates are stored. A [workflow](https://help.github.com/actions/reference/workflow-syntax-for-github-actions) is defined by a YAML file. Workflows have one or more jobs with each job containing a set of steps that perform individual tasks. Steps can run commands or use an action. You can create your own actions or use actions shared by the [GitHub community](https://github.com/marketplace?type=actions) and customize them as needed. This article shows how to use an action called [Azure Resource Manager Template Deployment JS](https://github.com/marketplace/actions/azure-resource-manager-arm-template-deployment-js) to deploy Resource Manager templates.
10+
[GitHub Actions](https://help.github.com/en/actions) enables you to create custom software development life-cycle workflows directly in your GitHub repository where your Azure Resource Manager (ARM) templates are stored. A [workflow](https://help.github.com/actions/reference/workflow-syntax-for-github-actions) is defined by a YAML file. Workflows have one or more jobs with each job containing a set of steps that perform individual tasks. Steps can run commands or use an action. You can create your own actions or use actions shared by the [GitHub community](https://github.com/marketplace?type=actions) and customize them as needed. This article shows how to use [Azure CLI Action](https://github.com/marketplace/actions/azure-cli-action) to deploy Resource Manager templates.
1111

12-
The [ARM Template Deployment JS action](https://github.com/marketplace/actions/azure-resource-manager-arm-template-deployment-js) has two dependent actions:
12+
Azure CLI Action has two dependent actions:
1313

1414
- **[Checkout](https://github.com/marketplace/actions/checkout)**: Check out your repository so the workflow can access any specified Resource Manager template.
1515
- **[Azure Login](https://github.com/marketplace/actions/azure-login)**: Log in with your Azure credentials
@@ -110,11 +110,12 @@ You can either create a workflow file and then push/upload the file to the repos
110110
with:
111111
creds: ${{ secrets.AZURE_CREDENTIALS }}
112112

113+
113114
- name: Deploy ARM Template
114-
uses: whiteducksoftware/azure-arm-action-js@v1
115+
uses: azure/CLI@v1
115116
with:
116-
resourceGroupName: myResourceGroup
117-
templateLocation: ./templates/azuredeploy.json
117+
inlineScript: |
118+
az deployment group create --resource-group myResourceGroup --template-file ./templates/azuredeploy.json
118119
```
119120
120121
The workflow file has three sections:
@@ -134,7 +135,8 @@ You can either create a workflow file and then push/upload the file to the repos
134135
- **Deploy ARM template**. Replace the value of **resourceGroupName**. If you used the Azure CLI script in [Configure deployment credentials](#configure-deployment-credentials), the generated resource group name is the project name with **rg** appended. Verify the value of **templateLocation**.
135136
136137
1. Select **Start commit**.
137-
1. Select **Commit new file**.
138+
1. Select **Commit directly to the master branch**.
139+
1. Select **Commit new file** (or **Commit changes**).
138140
139141
Because the workflow is configured to be triggered by either the workflow file or the template file being updated, the workflow starts right after you commit the changes.
140142

0 commit comments

Comments
 (0)