Skip to content

(feature): support viber and proxy #19

(feature): support viber and proxy

(feature): support viber and proxy #19

Workflow file for this run

name: Release Helm Chart as OCI
on:
push:
branches:
- main
paths:
- 'helm/versus-incident/**'
- '.github/workflows/helm-publish.yml'
# Add explicit permissions for the workflow
permissions:
contents: read
packages: write # Needed for publishing to GHCR
jobs:
release:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Install Helm
uses: azure/setup-helm@v3
with:
version: v3.12.0
- name: Login to GitHub Container Registry
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Add Helm Dependencies
run: |
cd helm/versus-incident
helm repo add bitnami https://charts.bitnami.com/bitnami
helm dependency update
- name: Set version variable
id: version
run: |
VERSION=$(grep '^version:' helm/versus-incident/Chart.yaml | awk '{print $2}')
echo "VERSION=$VERSION" >> $GITHUB_ENV
echo "Chart version: $VERSION"
- name: Package and Push Chart to OCI Registry
run: |
cd helm/versus-incident
helm package .
# Try to push the chart, and create the repository if it doesn't exist
if ! helm push versus-incident-${{ env.VERSION }}.tgz oci://ghcr.io/versuscontrol/charts; then
echo "Initial push failed. The repository might not exist yet. Creating it now..."
# Create parent directories if needed
helm registry login ghcr.io -u ${{ github.actor }} -p ${{ secrets.GITHUB_TOKEN }}
# Try pushing again
helm push versus-incident-${{ env.VERSION }}.tgz oci://ghcr.io/versuscontrol/charts
fi
# Verify the push was successful
echo "Verifying chart was pushed successfully..."
helm show chart oci://ghcr.io/versuscontrol/charts/versus-incident --version ${{ env.VERSION }}
- name: Display installation instructions
run: |
echo "Chart published successfully to OCI registry."