Skip to content
Latchkey

helm chart update workflow (cyclops-ui/cyclops)

The helm chart update workflow from cyclops-ui/cyclops, explained and optimized by Latchkey.

C

CI health: C - fair

Point runs-on at Latchkey and get run de-duplication, job timeouts, SHA-pinned actions, self-healing for flaky steps, and up to 58% lower cost, applied automatically.

Grade your own workflow free or run it on Latchkey →
Source: cyclops-ui/cyclops.github/workflows/helm-chart-update.ymlLicense Apache-2.0View source

What it does

This is the helm chart update workflow from the cyclops-ui/cyclops repository, a real project running GitHub Actions. It is shown here with attribution under its Apache-2.0 license.

Below, Latchkey shows a faster, safer version produced by its optimization engine.

The workflow

workflow (.yml)
name: helm chart update

on:
  push:
    paths:
      - 'install/chart/**'
#      - '.github/workflows/helm-chart-update.yml'
    branches:
      - main

jobs:
  push-oci:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v2
      - name: Login to DockerHub
        uses: docker/login-action@v1
        with:
          username: ${{ secrets.DOCKERHUB_USERNAME }}
          password: ${{ secrets.DOCKERHUB_TOKEN }}
      - name: Push Helm chart to Cyclops OCI
        run: |
          helm package install/chart
          helm push cyclops-$(yq .version install/chart/Chart.yaml).tgz oci://registry-1.docker.io/cyclopsui

  push-helm-repo:
    runs-on: ubuntu-latest
    steps:
      - name: Checkout Source Repository
        uses: actions/checkout@v3
      - name: Setup Helm
        run: |
          curl https://raw.githubusercontent.com/helm/helm/main/scripts/get-helm-3 | bash
      - name: Package Helm Chart
        working-directory: install/chart
        run: |
          mkdir -p ../packaged
          helm package . -d ../packaged
      - name: Checkout Target Repository
        uses: actions/checkout@v3
        with:
          repository: cyclops-ui/cyclops-ui.github.io
          ref: gh-pages
          token: ${{ secrets.PERSONAL_TOKEN }}
          path: cyclops-ui.github.io
      - name: Sync Packaged Helm Charts
        run: |
          cp -r ./install/packaged/* cyclops-ui.github.io/helm/
          cd cyclops-ui.github.io/helm
          
          helm repo index . --url https://cyclops-ui.github.io/helm
          
          git config user.name 'github-actions[bot]'
          git config user.email 'github-actions[bot]@users.noreply.github.com'
          git add .
          git commit -m "Update Helm repo"
          git push

The same workflow, on Latchkey

Removes redundant runs and caps runaway jobs. Added and changed lines are highlighted.

name: helm chart update
 
on:
  push:
    paths:
      - 'install/chart/**'
#      - '.github/workflows/helm-chart-update.yml'
    branches:
      - main
 
concurrency:
  group: ${{ github.workflow }}-${{ github.ref }}
  cancel-in-progress: true
 
jobs:
  push-oci:
    timeout-minutes: 30
    runs-on: latchkey-small
    steps:
      - uses: actions/checkout@v2
      - name: Login to DockerHub
        uses: docker/login-action@v1
        with:
          username: ${{ secrets.DOCKERHUB_USERNAME }}
          password: ${{ secrets.DOCKERHUB_TOKEN }}
      - name: Push Helm chart to Cyclops OCI
        run: |
          helm package install/chart
          helm push cyclops-$(yq .version install/chart/Chart.yaml).tgz oci://registry-1.docker.io/cyclopsui
 
  push-helm-repo:
    timeout-minutes: 30
    runs-on: latchkey-small
    steps:
      - name: Checkout Source Repository
        uses: actions/checkout@v3
      - name: Setup Helm
        run: |
          curl https://raw.githubusercontent.com/helm/helm/main/scripts/get-helm-3 | bash
      - name: Package Helm Chart
        working-directory: install/chart
        run: |
          mkdir -p ../packaged
          helm package . -d ../packaged
      - name: Checkout Target Repository
        uses: actions/checkout@v3
        with:
          repository: cyclops-ui/cyclops-ui.github.io
          ref: gh-pages
          token: ${{ secrets.PERSONAL_TOKEN }}
          path: cyclops-ui.github.io
      - name: Sync Packaged Helm Charts
        run: |
          cp -r ./install/packaged/* cyclops-ui.github.io/helm/
          cd cyclops-ui.github.io/helm
          
          helm repo index . --url https://cyclops-ui.github.io/helm
          
          git config user.name 'github-actions[bot]'
          git config user.email 'github-actions[bot]@users.noreply.github.com'
          git add .
          git commit -m "Update Helm repo"
          git push
 

What changed

1 third-party action is referenced by a movable tag. Pin it to the commit SHA (Latchkey resolves and applies this automatically) so a repointed tag cannot change what runs.

What Latchkey heals here

This workflow has steps that commonly fail on transient issues (network, registries, flaky browsers). On Latchkey managed runners they are detected, retried, and self-healed instead of failing your build:

This workflow runs 2 jobs per trigger. On Latchkey the same minutes cost up to 58% less than GitHub-hosted, with zero queue time.

Actions used in this workflow