forked from zenml-io/zenml
-
Notifications
You must be signed in to change notification settings - Fork 0
52 lines (50 loc) · 1.81 KB
/
publish_helm_chart.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
47
48
49
50
51
52
---
# package and push the zenml helm chart to the ECR repository
name: Publish Helm Chart
on:
workflow_call:
workflow_dispatch:
jobs:
publish_to_ecr:
name: Publish Helm Chart 🛞 to ECR ☁️
runs-on: ubuntu-latest
permissions:
contents: read
id-token: write
env:
ZENML_DEBUG: 1
ZENML_ANALYTICS_OPT_IN: false
PYTHONIOENCODING: utf-8
steps:
- name: Checkout repo
uses: actions/[email protected]
# The following sed command replaces the version number in Chart.yaml with the tag version.
# It replaces the line that starts with "version: " with "version: <tag version>"
- name: Add tag version to Chart.yaml
run: |
sed -i "s/version: .*/version: \"${{ github.ref_name }}\"/" src/zenml/zen_server/deploy/helm/Chart.yaml
- name: Configure AWS credentials
uses: aws-actions/configure-aws-credentials@v2
with:
role-to-assume: arn:aws:iam::715803424590:role/gh-action-role-zenml-helm
aws-region: us-east-1
- name: Login to Amazon ECR Public
id: login-ecr-public
uses: aws-actions/amazon-ecr-login@v2
with:
mask-password: 'true'
registry-type: public
# TODO: revisit the pinned helm version + find a higher version
- name: install helm with version 3.9.2
uses: azure/[email protected]
with:
version: v3.9.2 # default is latest (stable)
id: install-helm
- name: Package and push helm chart to Amazon ECR Public
env:
REGISTRY: ${{ steps.login-ecr-public.outputs.registry }}
REGISTRY_ALIAS: zenml
REPOSITORY: zenml
run: |-
helm package src/zenml/zen_server/deploy/helm
helm push $REPOSITORY-${{ github.ref_name }}.tgz oci://$REGISTRY/$REGISTRY_ALIAS