Skip to content

Commit 3f4d219

Browse files
committed
Refactor Azure Bicep deployment workflow
1 parent b1cf0ac commit 3f4d219

File tree

1 file changed

+19
-20
lines changed

1 file changed

+19
-20
lines changed

.github/workflows/deploy.yml

Lines changed: 19 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,9 @@
11
name: Azure Bicep
22

3-
on:
4-
workflow_dispatch
3+
on: workflow_dispatch
54

65
env:
7-
targetEnv: dev
6+
targetEnv: test
87

98
jobs:
109
build-and-deploy:
@@ -14,22 +13,22 @@ jobs:
1413
pages: write
1514
id-token: write
1615
steps:
17-
# Checkout code
18-
- uses: actions/checkout@main
16+
# Checkout code
17+
- uses: actions/checkout@main
1918

20-
# Log into Azure
21-
- uses: azure/[email protected]
22-
with:
23-
client-id: ${{ secrets.AZURE_CLIENT_ID }}
24-
tenant-id: ${{ secrets.AZURE_TENANT_ID }}
25-
subscription-id: ${{ secrets.AZURE_SUBSCRIPTION_ID }}
26-
enable-AzPSSession: true
19+
# Log into Azure
20+
- uses: azure/[email protected]
21+
with:
22+
client-id: ${{ secrets.AZURE_CLIENT_ID }}
23+
tenant-id: ${{ secrets.AZURE_TENANT_ID }}
24+
subscription-id: ${{ secrets.AZURE_SUBSCRIPTION_ID }}
25+
enable-AzPSSession: true
2726

28-
# Deploy ARM template
29-
- name: Run ARM deploy
30-
uses: azure/arm-deploy@v1
31-
with:
32-
subscriptionId: ${{ secrets.AZURE_SUBSCRIPTION_ID }}
33-
resourceGroupName: ${{ secrets.AZURE_RG }}
34-
template: ./src/InfrastructureAsCode/main.bicep
35-
parameters: environment=${{ env.targetEnv }}
27+
# Deploy ARM template
28+
- name: Run ARM deploy
29+
uses: azure/arm-deploy@v1
30+
with:
31+
subscriptionId: ${{ secrets.AZURE_SUBSCRIPTION_ID }}
32+
resourceGroupName: ${{ secrets.AZURE_RG }}
33+
template: ./src/InfrastructureAsCode/main.bicep
34+
parameters: environment=${{ env.targetEnv }}

0 commit comments

Comments
 (0)