Merge pull request #142 from microsoft/dev #91
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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 }} |