Skip to content

App Service - Enabling Health Check (#2535) #43

App Service - Enabling Health Check (#2535)

App Service - Enabling Health Check (#2535) #43

Workflow file for this run

name: Main - Infra - Build and deploy
on:
push:
branches:
- main
paths:
- ".github/workflows/main-infra.yml"
- "infra/**"
workflow_dispatch:
concurrency:
group: main-infra
defaults:
run:
shell: pwsh
permissions:
id-token: write
contents: read
jobs:
build-and-deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Load .env file
uses: xom9ikk/dotenv@v2
with:
path: ./.github
- name: Build
run: |
az bicep build --file ${{ env.BICEP_PATH }}
- name: Azure 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: Deploy
run: |
$timestamp = (Get-Date -Format yyyy-MM-ddTHH-mm)
az group create `
--location ${{ env.AZURE_RESOURCE_GROUP_LOCATION }} `
--name ${{ env.AZURE_RESOURCE_GROUP }}
az deployment group create `
--name $timestamp `
--resource-group ${{ env.AZURE_RESOURCE_GROUP }} `
--template-file ${{ env.BICEP_PATH }} `
--parameters "servicePrincipalObjectId=${{ secrets.AZURE_SERVICE_PRINCIPAL_OBJECT_ID }}"