Skip to content

Workflow file for this run

name: Release Helm
on:
push:
branches:
- 'releases/*/v*'
jobs:
release:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Install Helm
uses: azure/setup-helm@v4
with:
version: v3.10.0
- name: Install yq
uses: mikefarah/yq@v4.44.6
- name: Login to mrmhub
run: |
echo '${{ secrets.MRMHUB_PASSWORD }}' | helm registry login mrmhub.io --username '${{ secrets.MRMHUB_USERNAME }}' --password-stdin
- name: Configure chart version
id: chart_meta
run: |
cat >> "$GITHUB_OUTPUT" <<EOF
chart_name=$(cut -d / -f 4 <<<"${{ github.ref }}")
chart_version=$(cut -d / -f 5- <<<"${{ github.ref }}")
EOF
- name: Update chart version
run: |
chart_file="${{ steps.chart_meta.outputs.chart_name }}/Chart.yaml"
yq '.version = "${{ steps.chart_meta.outputs.chart_version }}"' \
"${chart_file}" > "${chart_file}.updated"
ls -l "${chart_file}"*
if ! diff -q "${chart_file}" "${chart_file}.updated"; then
ls -l "${chart_file}"*
mv -f "${chart_file}.update" "${chart_file}"
fi
make helm-docs
git diff
# - name: Package chart
# run: |
# helm package "${{ steps.chart_meta.outputs.chart_name }}" --version "${{ steps.chart_meta.outputs.chart_version }}"
# - name: Upload chart
# run: |
# helm push "${{ steps.chart_meta.outputs.chart_name }}-${{ steps.chart_meta.outputs.chart_version }}.tgz" oci://mrmhub.io/mikemrm