-
Notifications
You must be signed in to change notification settings - Fork 111
62 lines (54 loc) · 1.96 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
name: 'Scenario 1: Bicep Multi-Tenant ASEv3 Secure Baseline'
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/parameters/ase-multitenant.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/parameters/ase-multitenant.parameters.jsonc'
- '!scenarios/secure-baseline-multitenant/**.md'
permissions:
id-token: write
contents: read
env:
deploymentPath: 'scenarios/secure-baseline-multitenant/bicep/main.bicep'
scenarioName: 'ase-multitenant'
region: 'westus2'
jobs:
prepare-environment:
name: 'Prepare CICD Environment for Bicep Workflow'
runs-on: ubuntu-latest
steps:
- name: Checkout the code
uses: actions/checkout@main
outputs:
region: ${{ env.region }}
modulePath: ${{ env.deploymentPath }}
bicepParamPath: ${{ env.deploymentPath }}/parameters/${{ env.scenarioName }}.parameters.jsonc
call-workflow-passing-data:
name: 'Bicep CICD'
needs:
- prepare-environment
uses: ./.github/workflows/.template.bicep.yml
with:
region: ${{ needs.prepare-environment.outputs.region }}
modulePath: ${{ needs.prepare-environment.outputs.modulePath }}
bicepParamPath: ${{ needs.prepare-environment.outputs.bicepParamPath }}
# Ensure this value is a boolean
destroy: ${{ github.event.inputs.destroy == 'true' }}
secrets: inherit