Skip to content

Commit d834036

Browse files
committed
update task version
1 parent 1992147 commit d834036

File tree

1 file changed

+32
-32
lines changed

1 file changed

+32
-32
lines changed

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

Lines changed: 32 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -101,25 +101,31 @@ To create a workflow, take the following steps:
101101
1. Rename the workflow file if you prefer a different name other than **main.yml**. For example: **deployBicepFile.yml**.
102102
1. Replace the content of the yml file with the following code:
103103

104-
# [Service principal](#tab/userlevel)
104+
# [OpenID Connect](#tab/openid)
105105

106106
```yml
107-
name: Deploy Bicep file
108107
on: [push]
108+
name: Azure ARM
109+
permissions:
110+
id-token: write
111+
contents: read
109112
jobs:
110113
build-and-deploy:
111114
runs-on: ubuntu-latest
112115
steps:
113116

114-
- name: Checkout code
115-
uses: actions/checkout@main
117+
# Checkout code
118+
- uses: actions/checkout@main
116119

117-
- name: Log into Azure
118-
uses: azure/login@v1
120+
# Log into Azure
121+
- uses: azure/login@v2
119122
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 }}
121126

122-
- name: Deploy Bicep file
127+
# Deploy Bicep file
128+
- name: deploy
123129
uses: azure/arm-deploy@v1
124130
with:
125131
subscriptionId: ${{ secrets.AZURE_SUBSCRIPTION }}
@@ -129,41 +135,25 @@ To create a workflow, take the following steps:
129135
failOnStdErr: false
130136
```
131137
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)
143139
144140
```yml
141+
name: Deploy Bicep file
145142
on: [push]
146-
name: Azure ARM
147-
permissions:
148-
id-token: write
149-
contents: read
150143
jobs:
151144
build-and-deploy:
152145
runs-on: ubuntu-latest
153146
steps:
154147

155-
# Checkout code
156-
- uses: actions/checkout@main
148+
- name: Checkout code
149+
uses: actions/checkout@main
157150

158-
# Log into Azure
159-
- uses: azure/login@v1
151+
- name: Log into Azure
152+
uses: azure/login@v2
160153
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 }}
164155

165-
# Deploy Bicep file
166-
- name: deploy
156+
- name: Deploy Bicep file
167157
uses: azure/arm-deploy@v1
168158
with:
169159
subscriptionId: ${{ secrets.AZURE_SUBSCRIPTION }}
@@ -173,6 +163,16 @@ To create a workflow, take the following steps:
173163
failOnStdErr: false
174164
```
175165
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+
176176
---
177177

178178

0 commit comments

Comments
 (0)