-
Notifications
You must be signed in to change notification settings - Fork 1
59 lines (56 loc) · 1.86 KB
/
reusable-frontend-slot.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
name: Azure Deployment - Frontend Slot Resource Creation
on:
workflow_call:
inputs:
webAppName:
required: true
type: string
apiFunctionName:
required: true
type: string
ghaEnvironment:
required: true
type: string
azResourceGrpAppEncrypted:
required: true
type: string
azResourceGrpNetworkEncrypted:
required: true
type: string
slotName:
required: true
type: string
jobs:
deploy-frontend-slot-resources:
runs-on: ubuntu-latest
environment: ${{ inputs.ghaEnvironment }}
steps:
- uses: actions/checkout@v3
- uses: azure/login@v2
with:
creds: ${{ secrets.AZURE_CREDENTIALS }}
environment: ${{ vars.AZURE_ENVIRONMENT }}
- uses: cloudposse/github-action-secret-outputs@main
id: rgApp
with:
secret: ${{ secrets.PGP_SIGNING_PASSPHRASE }}
op: decode
in: ${{ inputs.azResourceGrpAppEncrypted }}
- uses: cloudposse/github-action-secret-outputs@main
id: rgNetwork
with:
secret: ${{ secrets.PGP_SIGNING_PASSPHRASE }}
op: decode
in: ${{ inputs.azResourceGrpNetworkEncrypted }}
- name: Create Webapp Slot Resource
run: |
webAppSubnetName="snet-${{ inputs.webAppName }}"
./ops/scripts/pipeline/slots/az-slot-web-resource-deploy.sh \
--resourceGroup ${{ steps.rgApp.outputs.out }} \
--webappName ${{ inputs.webappName }} \
--apiFunctionName ${{ inputs.apiFunctionName }} \
--slotName ${{ inputs.slotName }} \
--subscription ${{ secrets.AZURE_SUBSCRIPTION }} \
--network-rg ${{ steps.rgNetwork.outputs.out }} \
--vnet ${{ vars.AZ_NETWORK_VNET_NAME }} \
--subnet $webAppSubnetName