generated from segraef/Template
-
Notifications
You must be signed in to change notification settings - Fork 1
45 lines (39 loc) · 1.17 KB
/
bicep_deployment.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
name: Azure Bicep Deployment
on:
push:
branches:
- main
workflow_dispatch:
inputs:
resource_group:
description: 'Azure Resource Group'
required: true
default: 'rg-bice-deployment'
location:
description: 'Azure Region'
required: true
default: 'australiaeast'
permissions:
id-token: write
contents: read
jobs:
deploy:
runs-on: ubuntu-latest
env:
LOCATION: ${{ github.event.inputs.location || 'australiaeast' }}
RESOURCE_GROUP: ${{ github.event.inputs.resource_group || 'rg-bice-deployment' }}
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Login to Azure using OIDC
uses: azure/login@v2
with:
client-id: ${{ secrets.AZURE_CLIENT_ID }}
tenant-id: ${{ secrets.AZURE_TENANT_ID }}
subscription-id: ${{ secrets.AZURE_SUBSCRIPTION_ID }}
allow-no-subscriptions: true
enable-AzPSSession: true
- name: Deploy Infrastructure using Bicep
run: |
az group create -l $LOCATION -n $RESOURCE_GROUP
az deployment group create -f ./main.bicep -g $RESOURCE_GROUP