Skip to content

⬆️ Actions: Bump actions/checkout from 3 to 4 (#1372) #28

⬆️ Actions: Bump actions/checkout from 3 to 4 (#1372)

⬆️ Actions: Bump actions/checkout from 3 to 4 (#1372) #28

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
load-mode: strict
- name: Build
run: |
az bicep build --file ${{ env.BICEP_PATH }}
- name: Azure CLI - Login
uses: azure/login@v1
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 }}"