forked from sodalabsab/scalingcloud
-
Notifications
You must be signed in to change notification settings - Fork 0
45 lines (39 loc) · 1.22 KB
/
infra.yml
File metadata and controls
45 lines (39 loc) · 1.22 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
name: Deploy Infrastructure
on:
push:
paths:
- 'infra/main.bicep' # Only run when infra code changes
- '.github/workflows/infra.yml'
workflow_dispatch:
permissions:
id-token: write
contents: read
env:
RG_NAME: ${{ vars.RG_NAME }}
LOCATION: ${{ vars.LOCATION }}
jobs:
deploy-infra:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
# Log in using the HIGH PRIVILEGE Infra Identity
- name: Azure Login
uses: azure/login@v1
with:
client-id: ${{ secrets.AZURE_CLIENT_ID_INFRA }}
tenant-id: ${{ secrets.AZURE_TENANT_ID }}
subscription-id: ${{ secrets.AZURE_SUBSCRIPTION_ID }}
# Deploy main.bicep (Creates ACR, Identities, Assignments)
- name: Deploy Bicep
uses: azure/arm-deploy@v1
with:
scope: resourcegroup
subscriptionId: ${{ secrets.AZURE_SUBSCRIPTION_ID }}
resourceGroupName: ${{ env.RG_NAME }}
template: ./infra/main.bicep
parameters: >
githubUser=${{ github.repository_owner }}
githubRepo=${{ github.event.repository.name }}
acrName=${{ vars.ACR_NAME }}
acrName=${{ vars.ACR_NAME }}