Skip to content

1.2.0

1.2.0 #4

Workflow file for this run

# Copyright 2024 The MathWorks, Inc.
name: Release Helm Chart
on:
release:
types: [created]
jobs:
release-controller-image:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
steps:
- name: Check out the repo
uses: actions/checkout@v4
- name: Log in to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and push Docker image
uses: docker/build-push-action@v5
with:
push: true
tags: ghcr.io/mathworks-ref-arch/matlab-parallel-server-k8s/mjs-controller-image:${{ github.event.release.tag_name }}
context: ./images/controller
release-helm-chart:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
env:
CHART_DIR: chart/mjs
steps:
- name: Check out the repo
uses: actions/checkout@v4
- name: Install Helm
uses: azure/setup-helm@v4
- name: Lint chart
run: helm lint ${CHART_DIR} --set maxWorkers=4,matlabPVC=test,checkpointPVC=test,logPVC=test,workerLogPVC=test
- name: Check chart versions
run: grep "version. ${{ github.event.release.tag_name }}" ${CHART_DIR}/Chart.yaml && grep "appVersion. ${{ github.event.release.tag_name }}" ${CHART_DIR}/Chart.yaml # Use "." (any character) rather than ":", since ":" breaks YAML parser
- name: Package chart
run: helm package ${CHART_DIR} --version ${{ github.event.release.tag_name }} --app-version ${{ github.event.release.tag_name }}
- name: Login to GitHub Container Registry
run: echo ${{ secrets.HELM_TOKEN }} | helm registry login ghcr.io/mathworks-ref-arch --username hannahpullen --password-stdin
- name: Upload chart
run: helm push mjs-${{ github.event.release.tag_name }}.tgz oci://ghcr.io/mathworks-ref-arch/matlab-parallel-server-k8s