Skip to content

Commit daf91a0

Browse files
Merge branch 'psl-bug-36267' of https://github.com/microsoft/content-generation-solution-accelerator into psl-bug-36267
2 parents b3b1bd4 + a03c320 commit daf91a0

1 file changed

Lines changed: 10 additions & 2 deletions

File tree

.github/workflows/azure-dev.yml

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,15 @@ jobs:
2121
# Step 1: Checkout the code from your repository
2222
- name: Checkout code
2323
uses: actions/checkout@v4
24+
25+
# Step 2: Pre-authenticate Azure for azd validation
26+
- name: Login to Azure
27+
shell: bash
28+
run: |
29+
az login --service-principal -u "${{ secrets.AZURE_CLIENT_ID }}" -p "${{ secrets.AZURE_CLIENT_SECRET }}" --tenant "${{ secrets.AZURE_TENANT_ID }}"
30+
az account set --subscription "${{ secrets.AZURE_SUBSCRIPTION_ID }}"
2431
25-
# Step 2: Validate the Azure template using microsoft/template-validation-action
32+
# Step 3: Validate the Azure template using microsoft/template-validation-action
2633
- name: Validate Azure Template
2734
uses: microsoft/template-validation-action@v0.4.3
2835
with:
@@ -34,11 +41,12 @@ jobs:
3441
env:
3542
AZURE_CLIENT_ID: ${{ secrets.AZURE_CLIENT_ID }}
3643
AZURE_TENANT_ID: ${{ secrets.AZURE_TENANT_ID }}
44+
AZURE_CLIENT_SECRET: ${{ secrets.AZURE_CLIENT_SECRET }}
3745
AZURE_SUBSCRIPTION_ID: ${{ secrets.AZURE_SUBSCRIPTION_ID }}
3846
AZURE_ENV_NAME: ${{ secrets.AZURE_ENV_NAME }}
3947
AZURE_LOCATION: ${{ secrets.AZURE_LOCATION }}
4048
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
4149

42-
# Step 3: Print the result of the validation
50+
# Step 4: Print the result of the validation
4351
- name: Print result
4452
run: cat ${{ steps.validation.outputs.resultFile }}

0 commit comments

Comments
 (0)