-
Notifications
You must be signed in to change notification settings - Fork 0
44 lines (40 loc) · 1.27 KB
/
workflow.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
name: deploy-toy-website-environments
concurrency: toy-company
on:
push:
branches:
- main
workflow_dispatch:
permissions:
id-token: write
contents: read
jobs:
# Lint the Bicep file.
lint:
uses: ./.github/workflows/lint.yml
# Deploy to the test environment.
deploy-test:
uses: ./.github/workflows/deploy.yml
needs: lint
with:
environmentType: Test
resourceGroupName: ToyWebsiteTest
reviewApiUrl: https://sandbox.contoso.com/reviews
secrets:
AZURE_CLIENT_ID: ${{ secrets.AZURE_CLIENT_ID_TEST }}
AZURE_TENANT_ID: ${{ secrets.AZURE_TENANT_ID }}
AZURE_SUBSCRIPTION_ID: ${{ secrets.AZURE_SUBSCRIPTION_ID }}
reviewApiKey: ${{ secrets.REVIEW_API_KEY_TEST }}
# Deploy to the production environment.
deploy-production:
uses: ./.github/workflows/deploy.yml
needs: deploy-test
with:
environmentType: Production
resourceGroupName: ToyWebsiteProduction
reviewApiUrl: https://api.contoso.com/reviews
secrets:
AZURE_CLIENT_ID: ${{ secrets.AZURE_CLIENT_ID_PRODUCTION }}
AZURE_TENANT_ID: ${{ secrets.AZURE_TENANT_ID }}
AZURE_SUBSCRIPTION_ID: ${{ secrets.AZURE_SUBSCRIPTION_ID }}
reviewApiKey: ${{ secrets.REVIEW_API_KEY_TEST }}