ALZ-Bicep/accelerator/.github/workflows/alz-bicep-4b-vwan.yml

68 строки
1.9 KiB
YAML
Исходник Постоянная ссылка Обычный вид История

name: ALZ-Bicep-4B-VWAN
on:
push:
branches:
- "main"
2023-08-04 22:04:24 +03:00
paths:
- "config/custom-parameters/resourceGroupConnectivity.parameters.all.json"
- "config/custom-parameters/vwanConnectivity.parameters.all.json"
pull_request:
branches:
- "main"
paths:
- "config/custom-parameters/resourceGroupConnectivity.parameters.all.json"
- "config/custom-parameters/vwanConnectivity.parameters.all.json"
workflow_dispatch:
permissions:
id-token: write
contents: read
pull-requests: write
env:
ENV_FILE: ".env"
IS_PULL_REQUEST: "${{ github.event_name == 'pull_request' }}"
jobs:
ALZ_Bicep_4b_VWAN:
runs-on: ubuntu-latest
steps:
- name: Checkout Repo
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: "Remove Quotation Marks from Environment File"
uses: azure/powershell@v1
with:
inlineScript: |
Write-Host $ENV_FILE
(Get-Content -Path $env:ENV_FILE -Encoding UTF8) | ForEach-Object {$_ -replace '"',''} | Out-File -FilePath $env:ENV_FILE -Encoding UTF8
azPSVersion: "latest"
- name: Import Environment Variables from File
run: cat ${{ env.ENV_FILE }} >> $GITHUB_ENV
- name: OIDC Login to Tenant
uses: azure/login@v2
with:
client-id: ${{ secrets.AZURE_CLIENT_ID }}
tenant-id: ${{ secrets.AZURE_TENANT_ID }}
subscription-id: ${{ env.CONNECTIVITY_SUBSCRIPTION_ID }}
enable-AzPSSession: true
- name: "Connectivity Resource Group Deployment"
uses: azure/powershell@v1
with:
inlineScript: |
.\pipeline-scripts\Deploy-ALZConnectivityResourceGroup.ps1
azPSVersion: "latest"
- name: "Hub (VWAN) Deployment"
uses: azure/powershell@v1
with:
inlineScript: |
.\pipeline-scripts\Deploy-ALZHub-VWAN.ps1
azPSVersion: "latest"