-
Notifications
You must be signed in to change notification settings - Fork 1
81 lines (67 loc) · 3.11 KB
/
infra.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
74
75
76
77
78
79
80
81
#
# Notice: Any links, references, or attachments that contain sample scripts, code, or commands comes with the following notification.
#
# This Sample Code is provided for the purpose of illustration only and is not intended to be used in a production environment.
# THIS SAMPLE CODE AND ANY RELATED INFORMATION ARE PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED,
# INCLUDING BUT NOT LIMITED TO THE IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A PARTICULAR PURPOSE.
#
# We grant You a nonexclusive, royalty-free right to use and modify the Sample Code and to reproduce and distribute the object code form of the Sample Code,
# provided that You agree:
#
# (i) to not use Our name, logo, or trademarks to market Your software product in which the Sample Code is embedded;
# (ii) to include a valid copyright notice on Your software product in which the Sample Code is embedded; and
# (iii) to indemnify, hold harmless, and defend Us and Our suppliers from and against any claims or lawsuits,
# including attorneys’ fees, that arise or result from the use or distribution of the Sample Code.
#
# Please note: None of the conditions outlined in the disclaimer above will superseded the terms and conditions contained within the Premier Customer Services Description.
#
# DEMO POC - "AS IS"
name: Create Azure Resources
on:
workflow_dispatch:
jobs:
create-azure-resources:
env:
DEPLOYMENT_NAME: valet-deployment
RESOURCE_GROUP_NAME: ${{ secrets.RESOURCE_GROUP_NAME }}
LOCATION: ${{ secrets.LOCATION }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
# The build step is to be sure no errors are present
# in the bicep template
- name: Validate that bicep builds
run: az bicep build -f main.bicep
working-directory: ./bicep
- name: Azure Login
uses: Azure/login@v1
with:
creds: ${{ secrets.AZURE_CREDENTIALS }}
- name: deploy
id: createResources
uses: azure/arm-deploy@v1
with:
subscriptionId: ${{ secrets.AZURE_SUBSCRIPTION }}
scope: subscription
region: ${{ env.LOCATION }}
deploymentName: ${{ env.DEPLOYMENT_NAME }}
template: ./bicep/main.json
parameters: location=${{ env.LOCATION }} rgName=${{ env.RESOURCE_GROUP_NAME }}
- uses: gliech/create-github-secret-action@v1
name: Write Function Name
with:
name: FUNCTION_NAME
value: ${{ steps.createResources.outputs.functionName }}
pa_token: ${{ secrets.PA_TOKEN }}
- uses: gliech/create-github-secret-action@v1
name: Write Storage Name
with:
name: STORAGE_NAME
value: ${{ steps.createResources.outputs.storageName }}
pa_token: ${{ secrets.PA_TOKEN }}
- uses: gliech/create-github-secret-action@v1
name: Write AppGW SubnetId
with:
name: APPLICATION_GATEWAY_SUBNET_ID
value: ${{ steps.createResources.outputs.appGwSubnetId }}
pa_token: ${{ secrets.PA_TOKEN }}