Big rework #73
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |