hf #61
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: CI | |
on: | |
push: | |
branches: ["main"] | |
workflow_dispatch: | |
env: | |
VERSION: ${{ vars.MAJOR_VERSION }}.${{ vars.MINOR_VERSION }}.${{ vars.HF_VERSION }}-${{ github.run_number }} | |
jobs: | |
quality-check: | |
uses: ./.github/workflows/pr.yaml | |
Build_Push_Images: | |
runs-on: ubuntu-latest | |
needs: [quality-check] | |
permissions: write-all | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v2 | |
- name: Login to GHCR | |
uses: docker/login-action@v1 | |
with: | |
registry: ghcr.io | |
username: ${{ github.actor }} | |
password: ${{ secrets.GITHUB_TOKEN }} | |
- name: Build and Push Controller to GHCR | |
uses: docker/build-push-action@v2 | |
with: | |
push: true | |
context: . | |
file: Dockerfile | |
tags: ghcr.io/microsoft/kalypso-observability-hub-controller-manager:${{ env.VERSION }}, ghcr.io/microsoft/kalypso-observability-hub-controller-manager:latest | |
- name: Build and Push API server to GHCR | |
uses: docker/build-push-action@v2 | |
with: | |
push: true | |
context: ./storage | |
file: ./storage/Dockerfile | |
tags: ghcr.io/microsoft/kalypso-observability-hub-grpc-api-server:${{ env.VERSION }}, ghcr.io/microsoft/kalypso-observability-hub-grpc-api-server:latest | |
- name: Upload Version | |
uses: actions/[email protected] | |
with: | |
name: version | |
path: ${{ github.workspace }}/VERSION | |
Publish_Helm_Chart: | |
runs-on: ubuntu-latest | |
needs: [Build_Push_Images] | |
permissions: write-all | |
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: | | |
make helm-build | |
sed -i "s|tag: latest|tag: $VERSION|g" ./helm/kalypso-observability-hub/values.yaml | |
sed -i "s|tag: latest|tag: $VERSION|g" ./helm/kalypso-observability-hub/charts/api-server/values.yaml | |
- name: Publish Helm chart | |
uses: stefanprodan/helm-gh-pages@master | |
with: | |
token: ${{ secrets.GITHUB_TOKEN }} | |
charts_dir: ./helm | |
charts_url: . | |
branch: gh-pages |