Skip to content

ci: replace azure/setup-helm with direct install to fix Node.js 20 wa… #4

ci: replace azure/setup-helm with direct install to fix Node.js 20 wa…

ci: replace azure/setup-helm with direct install to fix Node.js 20 wa… #4

Workflow file for this run

name: Release Helm chart
on:
push:
branches: [main]
tags: ['v*']
paths:
- 'charts/**'
- '.github/workflows/helm.yml'
workflow_dispatch:
jobs:
oci:
name: Publish to GHCR (OCI)
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
steps:
- uses: actions/checkout@v6
- name: Install Helm
run: curl https://raw.githubusercontent.com/helm/helm/main/scripts/get-helm-3 | bash
- uses: docker/login-action@v4
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Set chart version from git tag
if: startsWith(github.ref, 'refs/tags/v')
run: |
VERSION="${GITHUB_REF_NAME#v}"
sed -i "s/^version:.*/version: ${VERSION}/" charts/envoy-router/Chart.yaml
sed -i "s/^appVersion:.*/appVersion: \"${GITHUB_REF_NAME}\"/" charts/envoy-router/Chart.yaml
- name: Package and push
run: |
helm package charts/envoy-router --destination /tmp/helm
for tgz in /tmp/helm/envoy-router-*.tgz; do
helm push "$tgz" oci://ghcr.io/${{ github.repository_owner }}/charts
done