Skip to content

Build and Publish Helm Chart #94

Build and Publish Helm Chart

Build and Publish Helm Chart #94

Workflow file for this run

name: Build and Publish Helm Chart
on:
workflow_dispatch:
inputs:
chart:
description: "Choose which chart to build"
required: true
type: choice
options:
- fuel-streams-publisher
- fuel-streams
- all
default: "all"
push:
branches:
- main
release:
types:
- published
permissions:
contents: read
packages: write
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
jobs:
helm-release:
runs-on: ubuntu-latest
strategy:
matrix:
chart:
- name: fuel-streams-publisher
path: cluster/charts/fuel-streams-publisher
- name: fuel-streams
path: cluster/charts/fuel-streams
steps:
- uses: actions/checkout@v4
- name: Helm Dependencies Update
run: |
cd ${{ matrix.chart.path }} && helm dependency update
- name: Get chart version
id: version
run: |
version=$(awk '/^version:/ {print $2}' ${{ matrix.chart.path }}/Chart.yaml)
echo "version=$version" >> $GITHUB_OUTPUT
- name: "Build chart: [${{ matrix.chart.name }} v${{ steps.version.outputs.version }}]"
if: github.event_name != 'workflow_dispatch' || github.event.inputs.chart == 'all' || github.event.inputs.chart
== matrix.chart.name
uses: bsord/[email protected]
with:
useOCIRegistry: true
registry-url: oci://ghcr.io/fuellabs/helmcharts
username: ${{ github.repository_owner }}
access-token: ${{ secrets.GITHUB_TOKEN }}
force: true
chart-folder: ${{ matrix.chart.path }}
- name: Build Summary
run: |-
echo "### Helm Charts Build Summary 📊" >> $GITHUB_STEP_SUMMARY
echo "| Chart | Version | Status |" >> $GITHUB_STEP_SUMMARY
echo "|-------|---------|--------|" >> $GITHUB_STEP_SUMMARY
echo "| ${{ matrix.chart.name }} | ${{ steps.version.outputs.version }} | ✅ Published |" >> $GITHUB_STEP_SUMMARY