Skip to content

Commit a8d979c

Browse files
committed
Update Azure deployment workflow to use Azure Login v2.1.1 and adjust configuration
1 parent 2617961 commit a8d979c

File tree

1 file changed

+17
-13
lines changed

1 file changed

+17
-13
lines changed

.github/workflows/azure-deploy.yml

Lines changed: 17 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -3,18 +3,17 @@ name: Azure Deploy
33
on:
44
push:
55
branches:
6-
- main
7-
6+
- main
87
paths:
9-
- 'generate-url-shortene/infrastructure/**'
8+
- 'generate-url-shortene/infrastructure/**'
109
pull_request:
1110
paths:
1211
- 'generate-url-shortene/infrastructure/**'
1312
workflow_dispatch: # Allows you to run the workflow manually
14-
13+
1514
permissions:
16-
id-token: write
17-
contents: read
15+
id-token: write
16+
contents: read
1817

1918
jobs:
2019
deploy-dev:
@@ -24,12 +23,17 @@ jobs:
2423
- uses: actions/checkout@v4
2524

2625
- name: Azure Login
27-
uses: azure/[email protected].0
26+
uses: azure/[email protected].1
2827
with:
29-
creds: '{"clientId":"${{ secrets.AZURE_CLIENT_ID }}","clientSecret":"${{ secrets.AZURE_CLIENT_SECRET }}","subscriptionId":"${{ vars.AZURE_SUBSCRIPTION_ID }}","tenantId":"${{ secrets.AZURE_TENANT_ID }}"}'
28+
client-id: ${{ secrets.AZURE_CLIENT_ID }}
29+
tenant-id: ${{ secrets.AZURE_TENANT_ID }}
30+
subscription-id: ${{ vars.AZURE_SUBSCRIPTION_ID }}
31+
enable-AzPSSession: false
32+
environment: azurecloud
33+
allow-no-subscriptions: false
34+
audience: api://AzureADTokenExchange
35+
auth-type: SERVICE_PRINCIPAL
3036

31-
32-
3337
- uses: azure/CLI@v2
3438
with:
3539
inlineScript: |
@@ -39,7 +43,7 @@ jobs:
3943
4044
- name: Deploy
4145
uses: azure/arm-deploy@v2
42-
with:
43-
scope: 'Resource Group'
46+
with:
47+
scope: 'Resource Group'
4448
resourceGroupName: ${{ vars.RESOURCE_GROUP_NAME }}
45-
template: generate-url-shortene/infrastructure/main.bicep
49+
template: generate-url-shortene/infrastructure/main.bicep

0 commit comments

Comments
 (0)