forked from microsoft/MLOpsTemplate
-
Notifications
You must be signed in to change notification settings - Fork 0
64 lines (56 loc) · 2.22 KB
/
workshop_cd.yml
File metadata and controls
64 lines (56 loc) · 2.22 KB
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
name: workshop-cd
on:
workflow_dispatch:
pull_request:
types:
- opened
branches:
- main
paths:
- src/workshop/core/**
- .github/workflows/workshop_cd.yml
jobs:
Workshop-Deployment:
runs-on: ubuntu-latest
steps:
- name: Check out repository code
uses: actions/checkout@v2
- name: Setup python
uses: actions/setup-python@v2
with:
python-version: '3.8'
- name: Upgrade pip
run: |
python -m pip install --upgrade pip
python -m pip install --upgrade build
python -m pip install --upgrade twine
- name: AZ Login
uses: azure/login@v1
with:
creds: ${{ secrets.AZURE_SERVICE_PRINCIPAL }} #setup replace AZURE_SERVICE_PRINCIPAL with the name of your Azure credentials secret in GitHub
- name: Install az ml & and tools
run: |
az extension add -n ml -y --version 2.2.1
sudo apt install jq
pip install yq
- name: Run deployment
uses: ./.github/actions/aml-endpoint-deploy
with:
resourceGroup: azureml #setup replace azureml with the name of your resource group in Azure
workspaceName: ws01ent #setup replace ws01ent with the name of your workspace in Azure
endpointFile: src/workshop/core/scoring/endpoint.yml
deploymentFile: src/workshop/core/scoring/deployment.yml
modelVersion: latest
- name: Test deployment
uses: ./.github/actions/aml-endpoint-test
with:
resourceGroup: azureml #setup replace azureml with the name of your resource group in Azure
workspaceName: ws01ent #setup replace ws01ent with the name of your workspace in Azure
endpointFile: src/workshop/core/scoring/endpoint.yml
requestFile: src/workshop/core/scoring/scoring_test_request.json
- name: Swap deployment
uses: ./.github/actions/aml-endpoint-swap
with:
resourceGroup: azureml #setup replace azureml with the name of your resource group in Azure
workspaceName: ws01ent #setup replace ws01ent with the name of your workspace in Azure
endpointFile: src/workshop/core/scoring/endpoint.yml