-
Notifications
You must be signed in to change notification settings - Fork 1
50 lines (43 loc) · 1.38 KB
/
deployResources.yml
File metadata and controls
50 lines (43 loc) · 1.38 KB
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
46
47
48
49
50
name: Deploy Infrastructure for AQME Talk
on:
push:
branches: [main]
paths:
- resources/**
workflow_dispatch:
permissions:
id-token: write
contents: read
env:
CURRENT_BRANCH: ${{ github.head_ref || github.ref_name }}
SECRET_CLIENT_ID: ${{ secrets.AZURE_CLIENT_ID }}
SECRET_TENANT_ID: ${{ secrets.AZURE_TENANT_ID }}
SECRET_SUBSCRIPTION_ID: ${{ secrets.AZURE_SUBSCRIPTION_ID }}
TEMPLATE_FILE_PATH: 'resources/allMessagingResources.bicep'
PARAMETERS_FILE_PATH: 'resources/allMessagingResources.parameters.json'
DEPLOYMENT_NAME: 'aqme-resources-deployment'
jobs:
build-and-deploy:
runs-on: ubuntu-latest
environment:
name: 'dev'
steps:
- uses: actions/checkout@v4
with:
ref: ${{ env.CURRENT_BRANCH }}
- name: Login to Azure
uses: azure/login@v2
with:
client-id: ${{ env.SECRET_CLIENT_ID }}
tenant-id: ${{ env.SECRET_TENANT_ID }}
subscription-id: ${{ env.SECRET_SUBSCRIPTION_ID }}
- name: Deploy Resources
uses: Azure/arm-deploy@v2
with:
scope: subscription
subscriptionId: ${{ env.SECRET_SUBSCRIPTION_ID }}
region: 'centralus'
template: '${{ env.TEMPLATE_FILE_PATH }}'
parameters: '${{ env.PARAMETERS_FILE_PATH }}'
deploymentName: '${{env.DEPLOYMENT_NAME}}-${{github.run_number}}'
failOnStdErr: true