@@ -101,25 +101,31 @@ To create a workflow, take the following steps:
101
101
1 . Rename the workflow file if you prefer a different name other than ** main.yml** . For example: ** deployBicepFile.yml** .
102
102
1 . Replace the content of the yml file with the following code:
103
103
104
- # [ Service principal ] ( #tab/userlevel )
104
+ # [ OpenID Connect ] ( #tab/openid )
105
105
106
106
``` yml
107
- name : Deploy Bicep file
108
107
on : [push]
108
+ name : Azure ARM
109
+ permissions :
110
+ id-token : write
111
+ contents : read
109
112
jobs :
110
113
build-and-deploy :
111
114
runs-on : ubuntu-latest
112
115
steps :
113
116
114
- - name : Checkout code
115
- uses : actions/checkout@main
117
+ # Checkout code
118
+ - uses : actions/checkout@main
116
119
117
- - name : Log into Azure
118
- uses : azure/login@v1
120
+ # Log into Azure
121
+ - uses : azure/login@v2
119
122
with :
120
- creds : ${{ secrets.AZURE_CREDENTIALS }}
123
+ client-id : ${{ secrets.AZURE_CLIENT_ID }}
124
+ tenant-id : ${{ secrets.AZURE_TENANT_ID }}
125
+ subscription-id : ${{ secrets.AZURE_SUBSCRIPTION_ID }}
121
126
122
- - name : Deploy Bicep file
127
+ # Deploy Bicep file
128
+ - name : deploy
123
129
uses : azure/arm-deploy@v1
124
130
with :
125
131
subscriptionId : ${{ secrets.AZURE_SUBSCRIPTION }}
@@ -129,41 +135,25 @@ To create a workflow, take the following steps:
129
135
failOnStdErr : false
130
136
` ` `
131
137
132
- Replace ` mystore` with your own storage account name prefix.
133
-
134
- > [!NOTE]
135
- > You can specify a JSON format parameters file instead in the ARM Deploy action (example: `.azuredeploy.parameters.json`).
136
-
137
- The first section of the workflow file includes :
138
-
139
- - **name**: The name of the workflow.
140
- - **on**: The name of the GitHub events that triggers the workflow. The workflow is triggered when there's a push event on the main branch.
141
-
142
- # [OpenID Connect](#tab/openid)
138
+ # [Service principal](#tab/userlevel)
143
139
144
140
` ` ` yml
141
+ name : Deploy Bicep file
145
142
on : [push]
146
- name: Azure ARM
147
- permissions:
148
- id-token: write
149
- contents: read
150
143
jobs :
151
144
build-and-deploy :
152
145
runs-on : ubuntu-latest
153
146
steps :
154
147
155
- # Checkout code
156
- - uses: actions/checkout@main
148
+ - name : Checkout code
149
+ uses : actions/checkout@main
157
150
158
- # Log into Azure
159
- - uses: azure/login@v1
151
+ - name : Log into Azure
152
+ uses : azure/login@v2
160
153
with :
161
- client-id: ${{ secrets.AZURE_CLIENT_ID }}
162
- tenant-id: ${{ secrets.AZURE_TENANT_ID }}
163
- subscription-id: ${{ secrets.AZURE_SUBSCRIPTION_ID }}
154
+ creds : ${{ secrets.AZURE_CREDENTIALS }}
164
155
165
- # Deploy Bicep file
166
- - name: deploy
156
+ - name : Deploy Bicep file
167
157
uses : azure/arm-deploy@v1
168
158
with :
169
159
subscriptionId : ${{ secrets.AZURE_SUBSCRIPTION }}
@@ -173,6 +163,16 @@ To create a workflow, take the following steps:
173
163
failOnStdErr : false
174
164
` ` `
175
165
166
+ Replace ` mystore` with your own storage account name prefix.
167
+
168
+ > [!NOTE]
169
+ > You can specify a JSON format parameters file instead in the ARM Deploy action (example: `.azuredeploy.parameters.json`).
170
+
171
+ The first section of the workflow file includes :
172
+
173
+ - **name**: The name of the workflow.
174
+ - **on**: The name of the GitHub events that triggers the workflow. The workflow is triggered when there's a push event on the main branch.
175
+
176
176
---
177
177
178
178
0 commit comments