Skip to content

Merge pull request #32 from zenml-io/feature/rework #89

Merge pull request #32 from zenml-io/feature/rework

Merge pull request #32 from zenml-io/feature/rework #89

Workflow file for this run

name: Promotion flow
on:
push:
branches: [ main ]
jobs:
run-production-workflow:
runs-on: ubuntu-latest
env:
ZENML_HOST: ${{ secrets.ZENML_HOST }}
ZENML_API_KEY: ${{ secrets.ZENML_API_KEY }}
ZENML_DEBUG: true
ZENML_ANALYTICS_OPT_IN: false
ZENML_LOGGING_VERBOSITY: INFO
steps:
- name: Check out repository code
uses: actions/checkout@v3
- name: Get latest SHA before merge
id: last-commit
run: |
echo "last_commit_in_pr=$(echo "$GITHUB_CONTEXT" | jq '.event.commits[].id' | tail -n 2 | head -n 1 | sed 's/"//g')" >> "$GITHUB_OUTPUT"
env:
GITHUB_CONTEXT: ${{ toJson(github) }}
- uses: actions/setup-python@v4
with:
python-version: '3.9'
- name: Install requirements
run: |
make install-local
- name: Connect to ZenML server
run: |
zenml connect --url $ZENML_HOST --api-key $ZENML_API_KEY
- name: Set stack
run: |
zenml stack set default
- name: Run pipeline
run: |
python promote.py \
--version ${{ steps.last-commit.outputs.last_commit_in_pr }}