-
Notifications
You must be signed in to change notification settings - Fork 5
76 lines (62 loc) · 2.13 KB
/
ci.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
name: CI
on:
push:
branches: ["main", "eedorenko/*"]
workflow_dispatch:
jobs:
Build_Push_Scheduler_Image:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Login to GHCR
uses: docker/#-action@v1
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Generate Image Tag
run: |
IMAGE_TAG=${{ vars.MAJOR_VERSION }}.${{ vars.MINOR_VERSION }}.${{ vars.HF_VERSION }}-${{ github.run_number }}
echo "IMAGE_TAG=$IMAGE_TAG" >> $GITHUB_ENV
echo $IMAGE_TAG > $GITHUB_WORKSPACE/IMAGE_TAG
make build
- name: Build and Push to GHCR
uses: docker/build-push-action@v2
with:
push: true
context: .
file: Dockerfile
tags: ghcr.io/microsoft/kalypso-scheduler:${{ env.IMAGE_TAG }}, ghcr.io/microsoft/kalypso-scheduler:latest
- name: Upload Image Tags
uses: actions/upload-artifact@v4.4.3
with:
name: image_tag_paris
path: ${{ github.workspace }}/IMAGE_TAG
Publish_Helm_Chart:
runs-on: ubuntu-latest
needs: [Build_Push_Scheduler_Image]
permissions:
contents: write
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Install Helmify
run: |
wget https://github.com/arttor/helmify/releases/download/v0.3.23/helmify_0.3.23_Linux_64-bit.tar.gz
tar -xvf helmify_0.3.23_Linux_64-bit.tar.gz
mv helmify /usr/local/bin
- name: Build Helm Chart
run: |
export IMG=ghcr.io/microsoft/kalypso-scheduler:${{ vars.MAJOR_VERSION }}.${{ vars.MINOR_VERSION }}.${{ vars.HF_VERSION }}-${{ github.run_number }}
make helm-build
- name: Publish Helm chart
uses: stefanprodan/helm-gh-pages@master
with:
token: ${{ secrets.GITHUB_TOKEN }}
charts_dir: ./helm
charts_url: .
branch: gh-pages