-
Notifications
You must be signed in to change notification settings - Fork 111
73 lines (64 loc) · 2.55 KB
/
scenario1.bicep.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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
name: 'Scenario 1: Bicep Multi-Tenant ASEv3 Secure Baseline'
# This workflow tests the ASEv3 Secure Baseline Multi-Tenant scenario deployment.
# This will use the default parameter file (main.parameters.jsonc) with an overridden
# SKU to deploy ASEv3
concurrency:
group: '${{ github.workflow }} @ ${{ github.event.pull_request.head.label || github.head_ref || github.ref }}'
cancel-in-progress: false
on:
workflow_dispatch:
push:
branches:
- main
paths:
- '.github/workflows/_template.bicep.yml'
- '.github/workflows/scenario1.bicep.yml'
- 'scenarios/secure-baseline-multitenant/bicep/**.bicep'
- 'scenarios/secure-baseline-multitenant/bicep/main.parameters.jsonc'
- '!scenarios/secure-baseline-multitenant/**.md'
pull_request:
branches:
- main
paths:
- '.github/workflows/_template.bicep.yml'
- '.github/workflows/scenario1.bicep.yml'
- 'scenarios/secure-baseline-multitenant/bicep/**.bicep'
- 'scenarios/secure-baseline-multitenant/bicep/main.parameters.jsonc'
- '!scenarios/secure-baseline-multitenant/**.md'
permissions:
id-token: write
contents: read
env:
deployStackName: 'Scenario1-ASEv3-Secure-Baseline-MultiTenant'
deploymentPath: 'scenarios/secure-baseline-multitenant/bicep/main.bicep'
scenarioName: 'ase-multitenant'
region: 'westus2'
# webAppPlanSKU is the only parameter that is overridden for ASEv3
webAppPlanSku: 'ASE_I3V2_AZ'
jobs:
prepare-environment:
name: 'Prepare CICD Environment for Bicep Workflow'
runs-on: ubuntu-latest
steps:
- name: Checkout the code
uses: actions/checkout@main
outputs:
deployStackName: ${{ env.deployStackName }}
region: ${{ env.region }}
modulePath: ${{ env.deploymentPath }}
bicepParamPath: ${{ env.deploymentPath }}/main.parameters.jsonc
bicepAdditionalParams: -p webAppPlanSku=${{ env.webAppPlanSku }} --deny-settings-mode 'none'
call-workflow-passing-data:
name: 'Bicep CICD'
needs:
- prepare-environment
uses: ./.github/workflows/.template.bicep.yml
with:
deployStackName: ${{ needs.prepare-environment.outputs.deployStackName }}
region: ${{ needs.prepare-environment.outputs.region }}
modulePath: ${{ needs.prepare-environment.outputs.modulePath }}
bicepParamPath: ${{ needs.prepare-environment.outputs.bicepParamPath }}
bicepAdditionalParams: ${{ needs.prepare-environment.outputs.bicepAdditionalParams }}
# Ensure this value is a boolean
destroy: ${{ github.event.inputs.destroy == 'true' }}
secrets: inherit