-
Notifications
You must be signed in to change notification settings - Fork 149
51 lines (47 loc) · 1.72 KB
/
azd-template-validation.yml
File metadata and controls
51 lines (47 loc) · 1.72 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
name: AZD Template Validation
on:
workflow_dispatch:
push:
branches:
- main
paths:
- 'infra/**'
- 'azure.yaml'
- 'scripts/**'
- '.github/workflows/azure-dev.yml'
permissions:
contents: read
id-token: write
pull-requests: write
jobs:
template_validation:
runs-on: ubuntu-latest
name: azd template validation
steps:
- uses: actions/checkout@v4
with:
submodules: recursive
# This postprovision cleanup step (Stage 19) has been removed from azure.yaml because
# azd down was failing in the pipeline. As a workaround, we are removing this step
# to ensure the pipeline runs successfully.
- name: Remove postprovision cleanup step from azure.yaml
run: |
yq -i 'del(.hooks.postprovision[] | select(.run == "./submodules/ai-landing-zone/bicep/scripts/postprovision.ps1"))' azure.yaml
- uses: microsoft/template-validation-action@Latest
with:
validateAzd: ${{ vars.TEMPLATE_VALIDATE_AZD }}
useDevContainer: ${{ vars.TEMPLATE_USE_DEV_CONTAINER }}
id: validation
env:
AZURE_CLIENT_ID: ${{ secrets.AZURE_CLIENT_ID }}
AZURE_TENANT_ID: ${{ secrets.AZURE_TENANT_ID }}
AZURE_SUBSCRIPTION_ID: ${{ secrets.AZURE_SUBSCRIPTION_ID }}
AZURE_ENV_NAME: ${{ vars.AZURE_ENV_NAME }}
AZURE_LOCATION: ${{ vars.AZURE_LOCATION }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
TEMP: /tmp
fabricCapacityMode: 'none'
AZURE_PRINCIPAL_ID: ${{ vars.PRINCIPAL_ID || secrets.AZURE_CLIENT_ID }}
AZURE_PRINCIPAL_TYPE: 'ServicePrincipal'
- name: print result
run: cat ${{ steps.validation.outputs.resultFile }}