Skip to content

Release Artifacts

Release Artifacts #1

Workflow file for this run

name: Release Artifacts
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@v2
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and push Docker image
uses: docker/build-push-action@v3
with:
push: true
tags: ghcr.io/mathworks-ref-arch/matlab-parallel-server-k8s/mjs-controller-image:${{ github.event.release.tag_name }}
context: ./controller
file: ./controller/Dockerfile
release-helm-chart:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
steps:
- name: Check out the repo
uses: actions/checkout@v3
- name: Install Helm
uses: azure/setup-helm@v4
- name: Lint the chart
run: helm lint mjs --set maxWorkers=4,matlabPVC=test,checkpointPVC=test,logPVC=test,workerLogPVC=test
- name: Check chart versions
run: grep "version. ${{ github.event.release.tag_name }}" mjs/Chart.yaml && grep "appVersion. ${{ github.event.release.tag_name }}" mjs/Chart.yaml # Use "." (any character) rather than ":", since ":" breaks YAML parser
- name: Package the chart
run: echo ${{ github.event.release.tag_name }} && helm package mjs --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/hannahpullen --username hannahpullen --password-stdin
- name: Deploy the chart
run: helm push mjs-${GITHUB_REF#refs/tags/}.tgz oci://ghcr.io/mathworks-ref-arch/matlab-parallel-server-k8s