Skip to content

Commit 630707d

Browse files
Update deploy-v2-windows.yml to enhance Azure CLI setup and streamline login process
1 parent e594cc7 commit 630707d

1 file changed

Lines changed: 5 additions & 32 deletions

File tree

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

Lines changed: 5 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Deploy-Test-Cleanup (v2)
1+
name: Deploy-Test-Cleanup (v2) Windows
22
on:
33
# pull_request:
44
# branches:
@@ -358,21 +358,6 @@ jobs:
358358
"RESOURCE_GROUP_NAME=${UNIQUE_RG_NAME}" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
359359
Write-Host "Generated RESOURCE_GROUP_NAME: ${UNIQUE_RG_NAME}"
360360
}
361-
362-
- name: Setup Azure Developer CLI
363-
shell: bash
364-
run: |
365-
# Install Azure Developer CLI for Windows
366-
powershell -Command "Invoke-WebRequest 'https://aka.ms/install-azd.ps1' -OutFile 'install-azd.ps1'; ./install-azd.ps1"
367-
azd version
368-
369-
- name: Login to Azure
370-
id: login-azure
371-
shell: bash
372-
run: |
373-
az login --service-principal -u ${{ secrets.AZURE_CLIENT_ID }} -p ${{ secrets.AZURE_CLIENT_SECRET }} --tenant ${{ secrets.AZURE_TENANT_ID }}
374-
azd auth login --client-id ${{ secrets.AZURE_CLIENT_ID }} --client-secret ${{ secrets.AZURE_CLIENT_SECRET }} --tenant-id ${{ secrets.AZURE_TENANT_ID }}
375-
376361
- name: Install Bicep CLI
377362
shell: bash
378363
run: az bicep install
@@ -824,29 +809,17 @@ jobs:
824809
- name: Checkout Code
825810
uses: actions/checkout@v4
826811

827-
- name: Setup Azure Developer CLI
828-
shell: bash
829-
run: |
830-
# Install Azure Developer CLI for Windows
831-
powershell -Command "Invoke-WebRequest 'https://aka.ms/install-azd.ps1' -OutFile 'install-azd.ps1'; ./install-azd.ps1"
832-
azd version
833-
834-
- name: Login to Azure
835-
shell: bash
836-
run: |
837-
azd auth login --client-id ${{ secrets.AZURE_CLIENT_ID }} --client-secret ${{ secrets.AZURE_CLIENT_SECRET }} --tenant-id ${{ secrets.AZURE_TENANT_ID }}
838-
azd config set defaults.subscription ${{ secrets.AZURE_SUBSCRIPTION_ID }}
839-
840-
- name: Setup Azure CLI for Docker cleanup
812+
- name: Setup Azure CLI
841813
shell: bash
842814
run: |
843815
# Azure CLI is pre-installed on Windows GitHub runners
844-
az --version
816+
az --version # Verify installation
845817
846-
- name: Login to Azure CLI for Docker cleanup
818+
- name: Login to Azure
847819
shell: bash
848820
run: |
849821
az login --service-principal -u ${{ secrets.AZURE_CLIENT_ID }} -p ${{ secrets.AZURE_CLIENT_SECRET }} --tenant ${{ secrets.AZURE_TENANT_ID }}
822+
az account set --subscription ${{ secrets.AZURE_SUBSCRIPTION_ID }}
850823
851824
- name: Delete Resource Group Directly (Optimized Cleanup)
852825
shell: bash

0 commit comments

Comments
 (0)