Merge pull request #132 from Azure/dependabot/pip/tooling/azure-autom… #1
This file contains 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: Bicep What If | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
branches: | |
- main | |
paths: | |
- 'dev-infrastructure/**/*.bicep' | |
permissions: | |
id-token: write | |
contents: read | |
jobs: | |
test: | |
permissions: | |
contents: 'read' | |
runs-on: 'ubuntu-latest' | |
steps: | |
- uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4.1.6 | |
with: | |
fetch-depth: 1 | |
- name: 'Az CLI login' | |
uses: azure/login@v2 | |
with: | |
client-id: ${{ secrets.AZURE_CLIENT_ID }} | |
tenant-id: ${{ secrets.AZURE_TENANT_ID }} | |
subscription-id: ${{ secrets.AZURE_SUBSCRIPTION_ID }} | |
- name: 'Deployment What If' | |
uses: azure/cli@v2 | |
with: | |
azcliversion: latest | |
inlineScript: | | |
RESOURCEGROUP=$GITHUB_RUN_ID | |
cd dev-infrastructure/ | |
# service cluster | |
az deployment group what-if \ | |
--name "${GITHUB_RUN_ID}" \ | |
--resource-group "${RESOURCEGROUP}" \ | |
--template-file templates/svc-cluster.bicep \ | |
--parameters configurations/svc-cluster.bicepparam \ | |
--parameters currentUserId="${GITHUB_ACTOR}" | |
# management cluster | |
az deployment group what-if \ | |
--name "${GITHUB_RUN_ID}" \ | |
--resource-group "${RESOURCEGROUP}" \ | |
--template-file templates/mgmt-cluster.bicep \ | |
--parameters configurations/mgmt-cluster.bicepparam \ | |
--parameters currentUserId="${GITHUB_ACTOR}" |