-
Notifications
You must be signed in to change notification settings - Fork 0
51 lines (42 loc) · 1.22 KB
/
main.yml
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
51
name: Deploy Todo App (E2E)
concurrency:
group: todo-all-deploy
cancel-in-progress: false
on:
push:
branches:
- main
workflow_dispatch:
permissions:
id-token: write
contents: read
# https://learn.microsoft.com/en-us/training/modules/manage-end-end-deployment-scenarios-using-bicep-github-actions/3-configure-applications-virtual-machines
jobs:
build:
name: Build
uses: ./.github/workflows/build.yml
lint:
name: Lint
uses: ./.github/workflows/lint.yml
deploy-test:
name: Deploy [test]
uses: ./.github/workflows/deploy.yml
with:
environment: test
resourceGroupName: TodoAppTest
secrets:
AZURE_CLIENT_ID: ${{ secrets.AZURE_CLIENT_ID }}
AZURE_TENANT_ID: ${{ secrets.AZURE_TENANT_ID }}
AZURE_SUBSCRIPTION_ID: ${{ secrets.AZURE_SUBSCRIPTION_ID }}
needs: [build, lint]
deploy-production:
name: Deploy [production]
uses: ./.github/workflows/deploy.yml
with:
environment: production
resourceGroupName: TodoAppProd
secrets:
AZURE_CLIENT_ID: ${{ secrets.AZURE_CLIENT_ID }}
AZURE_TENANT_ID: ${{ secrets.AZURE_TENANT_ID }}
AZURE_SUBSCRIPTION_ID: ${{ secrets.AZURE_SUBSCRIPTION_ID }}
needs: [deploy-test]