Skip to content

go

go #84

Workflow file for this run

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
- 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 Go
uses: actions/setup-go@v2
with:
go-version: '1.20'
- 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