Skip to content

Commit 9483c81

Browse files
committed
update the toc.yml file
1 parent f0745b9 commit 9483c81

File tree

2 files changed

+24
-19
lines changed

2 files changed

+24
-19
lines changed

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

Lines changed: 22 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -7,28 +7,28 @@ ms.date: 05/01/2020
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 (SDLC) 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 (.yml) file that is located inside the .github/workflows directory in your repository. Workflows must have at least one job, and jobs contain 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 and customize them as needed. This article shows you how to deploy Resource Manager templates by using an Action called [Azure Resource Manager Template Deployment JS](https://github.com/marketplace/actions/azure-resource-manager-arm-template-deployment-js). You can find more actions from the [GitHub Marketplace](https://github.com/marketplace?type=actions).
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.
1111

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

14-
- [Azure Login](https://github.com/marketplace/actions/azure-login): Login with your Azure credentials
15-
- [Checkout](https://github.com/marketplace/actions/checkout): To checks-out your repository so the workflow can access any specified Resource Manager template.
14+
- **[Checkout](https://github.com/marketplace/actions/checkout)**: Check out your repository so the workflow can access any specified Resource Manager template.
15+
- **[Azure Login](https://github.com/marketplace/actions/azure-login)**: Log in with your Azure credentials
1616

17-
A basic workflow for deploying an Resource Manager template can have three steps:
17+
A basic workflow for deploying a Resource Manager template can have three steps:
1818

1919
1. Check out a template file.
20-
2. Sign on to Azure.
21-
3. Deploy an Resource Manager template
20+
2. Sign in to Azure.
21+
3. Deploy a Resource Manager template
2222

2323
## Prerequisites
2424

2525
You need a GitHub repository to store your Resource Manager templates and your workflow files. To create one, see [Creating a new repository](https://help.github.com/en/enterprise/2.14/user/articles/creating-a-new-repository).
2626

2727
## Configure deployment credentials
2828

29-
The Azure login action uses a service principal to authenticate against Azure. The principal of a CI / CD workflow typically needs the built-in contributor right in order to deploy Azure resources.
29+
The Azure login action uses a service principal to authenticate against Azure. The principal of a CI/CD workflow typically needs the built-in contributor right in order to deploy Azure resources.
3030

31-
The following Azure CLI script shows how to generate an Azure Service Principal with Contributor permissions on an Azure resource group. This resource group is where the workflow will deploy the resources defined in your Resource Manager template.
31+
The following Azure CLI script shows how to generate an Azure Service Principal with Contributor permissions on an Azure resource group. This resource group is where the workflow deploys the resources defined in your Resource Manager template.
3232

3333
```azurecli
3434
$projectName="[EnterAProjectName]"
@@ -39,9 +39,9 @@ $scope=$(az group create --name $resourceGroupName --location $location --query
3939
az ad sp create-for-rbac --name $appName --role Contributor --scopes $scope --sdk-auth
4040
```
4141

42-
Customize the value of $projectName and $location. The resource group name is the project name with **rg** appended.
42+
Customize the value of **$projectName** and **$location** in the script. The resource group name is the project name with **rg** appended. You need to specify the resource group name in your workflow.
4343

44-
The command should output a JSON object similar to this:
44+
The script outputs a JSON object similar to this:
4545

4646
```json
4747
{
@@ -55,9 +55,7 @@ The command should output a JSON object similar to this:
5555

5656
Copy the JSON output and store it as a GitHub secret within your GitHub repository. See [Prerequisite](#prerequisites) if you don't have a repository yet.
5757

58-
From your GitHub repository:
59-
60-
1. Select **Settings** from the top menu.
58+
1. From your GitHub repository, select the **Settings** tab.
6159
1. Select **Secret** from the left menu.
6260
1. Enter the following values:
6361

@@ -75,13 +73,13 @@ Add an Resource Manager template to the GitHub repository. If you don't have one
7573
https://raw.githubusercontent.com/Azure/azure-quickstart-templates/master/101-storage-account-create/azuredeploy.json
7674
```
7775

78-
You can put the file anywhere in the repository. The workflow sample assumes the template file is named **azuredeploy.json**, and it is stored in a folder called **templates** at the root of your repository.
76+
You can put the file anywhere in the repository. The workflow sample in the next section assumes the template file is named **azuredeploy.json**, and it is stored in a folder called **templates** at the root of your repository.
7977

8078
## Create workflow
8179

8280
The workflow file must be stored in the **.github/workflow** folder at the root of your repository. The workflow file extension can be either **.yml** or **.yaml**.
8381

84-
You can either create a workflow file and the push or upload the file to the repository, or use the following procedure:
82+
You can either create a workflow file and then push/upload the file to the repository, or use the following procedure:
8583

8684
1. From your GitHub repository, select **Actions** from the top menu.
8785
1. Select **New workflow**.
@@ -119,27 +117,32 @@ You can either create a workflow file and the push or upload the file to the rep
119117
templateLocation: ./templates/azuredeploy.json
120118
```
121119
122-
There are three sections in the workflow:
120+
The workflow file has three sections:
123121
124122
- **name**: The name of the workflow.
125123
- **on**: The name of the GitHub events that triggers the workflow. The workflow is trigger when there is a push event on the master branch, which modifies at least one of the two files specified. The two files are the workflow file and the template file.
126124
127-
> ![NOTE]
125+
> [!IMPORTANT]
128126
> Verify the two files and their paths match yours.
129127
- **jobs**: A workflow run is made up of one or more jobs. There is only one job called **deploy-storage-account-template**. This job has three steps:
130128
131129
- **Checkout source code**.
132-
- **Login to Azure**. Verify the secret name matches to what you saved to your repository. See [Configure deployment credentials](#configure-deployment-credentials).
130+
- **Login to Azure**.
131+
132+
> [!IMPORTANT]
133+
> Verify the secret name matches to what you saved to your repository. See [Configure deployment credentials](#configure-deployment-credentials).
133134
- **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**.
134135
135136
1. Select **Start commit**.
136137
1. Select **Commit new file**.
137138
139+
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.
140+
138141
## Check workflow status
139142
140143
1. Select the **Actions** tab. You shall see a **Create deployStorageAccount.yml** workflow listed. It takes 1-2 minutes to execute the workflow.
141144
1. Select the workflow to open it.
142-
1. Select **deploy-storage-account-template** (job name) from the left menu.
145+
1. Select **deploy-storage-account-template** (job name) from the left menu. The job name is defined in the workflow.
143146
1. Select **Deploy ARM Template** (step name) to expand it. You can see the REST API response.
144147
145148
## Next steps

articles/azure-resource-manager/templates/toc.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -247,6 +247,8 @@
247247
items:
248248
- name: VS project with pipelines
249249
href: add-template-to-azure-pipelines.md
250+
- name: Deploy - GitHub Actions
251+
href: deploy-github-actions.md
250252
- name: Export template
251253
href: export-template-portal.md
252254
- name: View deployment history

0 commit comments

Comments
 (0)