Skip to content

Commit

Permalink
Merge pull request #138 from Azure-Samples/marlenezw-patch-1
Browse files Browse the repository at this point in the history
Update azure-dev.yml
  • Loading branch information
marlenezw authored Aug 30, 2024
2 parents d32590d + a85191b commit 2329784
Showing 1 changed file with 16 additions and 1 deletion.
17 changes: 16 additions & 1 deletion .github/workflows/azure-dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ jobs:
with:
node-version: 18

- name: Log in with Azure (Federated Credentials)
- name: Log in with Azure Developer CLI (Federated Credentials)
if: ${{ env.AZURE_CLIENT_ID != '' }}
run: |
azd auth login `
Expand All @@ -59,6 +59,21 @@ jobs:
--tenant-id "$Env:AZURE_TENANT_ID"
shell: pwsh

- name: Log in with Azure CLI (Client Credentials)
if: ${{ env.AZURE_CREDENTIALS != '' }}
run: |
$info = $Env:AZURE_CREDENTIALS | ConvertFrom-Json -AsHashtable;
Write-Host "::add-mask::$($info.clientSecret)"
az login `
--service-principal`
--username "$($info.clientId)" `
--password "$($info.clientSecret)" `
--tenant "$($info.tenantId)"
shell: pwsh
env:
AZURE_CREDENTIALS: ${{ secrets.AZURE_CREDENTIALS }}

- name: Provision Infrastructure
run: azd provision --no-prompt
env:
Expand Down

0 comments on commit 2329784

Please sign in to comment.