Skip to content

Commit 9b24b00

Browse files
ci: Add Azure login refresh steps for WAF deployments in Linux and Windows workflows
1 parent 68e8a34 commit 9b24b00

2 files changed

Lines changed: 26 additions & 0 deletions

File tree

.github/workflows/job-deploy-linux.yml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -309,6 +309,19 @@ jobs:
309309
echo "WEBAPP_URL=$WEBAPP_URL" >> $GITHUB_ENV
310310
echo "WEBAPP_URL=$WEBAPP_URL" >> $GITHUB_OUTPUT
311311
312+
- name: Refresh Azure login # token expires for WAF deployments due to long deployment time
313+
uses: azure/login@v2
314+
with:
315+
client-id: ${{ secrets.AZURE_CLIENT_ID }}
316+
tenant-id: ${{ secrets.AZURE_TENANT_ID }}
317+
subscription-id: ${{ secrets.AZURE_SUBSCRIPTION_ID }}
318+
319+
- name: Refresh AZD login # token expires for WAF deployments due to long deployment time
320+
shell: bash
321+
run: |
322+
az account set --subscription "${{ secrets.AZURE_SUBSCRIPTION_ID }}"
323+
azd auth login --client-id "${{ secrets.AZURE_CLIENT_ID }}" --federated-credential-provider "github" --tenant-id "${{ secrets.AZURE_TENANT_ID }}"
324+
312325
- name: Run Post deployment scripts
313326
env:
314327
INPUT_RESOURCE_GROUP_NAME: ${{ inputs.RESOURCE_GROUP_NAME }}

.github/workflows/job-deploy-windows.yml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -313,6 +313,19 @@ jobs:
313313
"WEBAPP_URL=$WEBAPP_URL" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
314314
"WEBAPP_URL=$WEBAPP_URL" | Out-File -FilePath $env:GITHUB_OUTPUT -Encoding utf8 -Append
315315
316+
- name: Refresh Azure login # token expires for WAF deployments due to long deployment time
317+
uses: azure/login@v2
318+
with:
319+
client-id: ${{ secrets.AZURE_CLIENT_ID }}
320+
tenant-id: ${{ secrets.AZURE_TENANT_ID }}
321+
subscription-id: ${{ secrets.AZURE_SUBSCRIPTION_ID }}
322+
323+
- name: Refresh AZD login # token expires for WAF deployments due to long deployment time
324+
shell: bash
325+
run: |
326+
az account set --subscription "${{ secrets.AZURE_SUBSCRIPTION_ID }}"
327+
azd auth login --client-id "${{ secrets.AZURE_CLIENT_ID }}" --federated-credential-provider "github" --tenant-id "${{ secrets.AZURE_TENANT_ID }}"
328+
316329
- name: Run Post deployment scripts
317330
shell: bash
318331
env:

0 commit comments

Comments
 (0)