generated from Azure-Samples/mlops-enterprise-template
-
Notifications
You must be signed in to change notification settings - Fork 43
46 lines (39 loc) · 1.39 KB
/
setup.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
name: Infra Deployment and Training
on:
push:
paths:
- '.github/workflows/setup.yml'
# CONFIGURATION
#
# 1. Set up the following secrets in your repository:
# AZURE_RESOURCE_GROUP
# STORAGE_ACCOUNT
env:
AZURE_RESOURCE_GROUP: OH-Demo-RG #set this to your resource group name
#STORAGE_ACCOUNT: storage-account-name #set this to your storage-account-name
jobs:
deployment:
runs-on: ubuntu-latest
# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- name: Check Out Repository
id: checkout_repository
uses: actions/checkout@v2
# Login to Azure
- name: Azure Login
id: azure_login
uses: azure/login@v1
with:
creds: ${{ secrets.AZURE_CREDENTIALS }}
# Deploys Azure resources
- name: Deploy Azure resources
uses: azure/CLI@v1
with:
azcliversion: latest
inlineScript: |
az deployment group create \
--resource-group ${{ env.AZURE_RESOURCE_GROUP }} \
--template-file $GITHUB_WORKSPACE/infra/deploy.core-infra.json \
--parameters $GITHUB_WORKSPACE/infra/params.deploy.core-infra.json \
patToken=${{secrets.PATTOKEN}} repo_name=$GITHUB_REPOSITORY DataLakestorageName=${{ env.STORAGE_ACCOUNT }}