-
Notifications
You must be signed in to change notification settings - Fork 4
77 lines (63 loc) · 2.02 KB
/
staging.yaml
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
name: staging
on:
pull_request:
branches:
- main
jobs:
run-staging-workflow:
runs-on: ubuntu-latest
env:
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
GCP_CREDENTIALS: ${{ secrets.GCP_CREDENTIALS }}
ZENML_HOST: ${{ secrets.ZENML_HOST }}
ZENML_API_KEY: ${{ secrets.ZENML_API_KEY }}
ZENML_STACK: ${{ secrets.ZENML_STAGING_STACK }}
ZENML_DEBUG: true
ZENML_ANALYTICS_OPT_IN: false
ZENML_LOGGING_VERBOSITY: INFO
steps:
- name: Check out repository code
uses: actions/checkout@v3
- id: 'auth'
uses: 'google-github-actions/auth@v1'
with:
credentials_json: '${{ secrets.GCP_CREDENTIALS }}'
- name: 'Set up Cloud SDK'
uses: 'google-github-actions/setup-gcloud@v1'
- id: install-kubectl
uses: azure/setup-kubectl@v3
- name: Authenticate docker
run: |
gcloud auth configure-docker --project zenml-demos
- uses: actions/setup-python@v4
with:
python-version: '3.9'
- name: Install requirements
run: |
make install-gcp
- name: Install wkhtmltopdf
run: sudo apt-get install wkhtmltopdf
- name: Connect to ZenML server
run: |
zenml connect --url $ZENML_HOST --api-key $ZENML_API_KEY
- name: Set stack
run: |
zenml stack set ${{ env.ZENML_STACK }}
- name: Run pipeline
run: |
python run.py \
--pipeline train \
--dataset staging
- name: Read training report
id: report
uses: juliangruber/read-file-action@v1
with:
path: ./model_train_results.md
- name: PR comment with training report
uses: thollander/actions-comment-pull-request@v2
with:
filePath: ./model_train_results.md
comment_tag: training_report
mode: recreate
create_if_not_exists: true