Skip to content

Merge pull request #6 from zama-ai/piizama/mpc-operator-check-awskms #10

Merge pull request #6 from zama-ai/piizama/mpc-operator-check-awskms

Merge pull request #6 from zama-ai/piizama/mpc-operator-check-awskms #10

Workflow file for this run

name: "Helm Chart Release"
on:
push:
branches:
- main
paths:
- 'charts/**'
workflow_dispatch:
permissions:
contents: read
packages: write
env:
HELM_VERSION: v3.16.4
jobs:
helm-release:
runs-on: ubuntu-latest
environment: main
steps:
- name: Checkout
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
with:
fetch-depth: 0
- name: Configure Git
run: |
git config user.name "$GITHUB_ACTOR"
git config user.email "[email protected]"
- name: Login to GitHub Container Registry
uses: docker/login-action@5e57cd118135c172c3672efd75eb46360885c0ef #v3.6.0
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Install Helm
uses: azure/setup-helm@1a275c3b69536ee54be43f2070a358922e12c8d4 #v4.3.1
with:
version: ${{ env.HELM_VERSION }}
# See https://github.com/helm/chart-releaser?tab=readme-ov-file#dealing-with-charts-that-have-dependencies
- name: Add helm repositories dependencies
run: |
helm repo add postgres-operator https://opensource.zalando.com/postgres-operator/charts/postgres-operator
helm repo add ext-postgres-operator https://movetokube.github.io/postgres-operator/
- name: Run chart-releaser
uses: helm/chart-releaser-action@cae68fefc6b5f367a0275617c9f83181ba54714f # v1.7.0
env:
CR_TOKEN: ${{ secrets.GITHUB_TOKEN }}"
CR_SKIP_EXISTING: true
CR_SKIP_UPLOAD: true
CR_GENERATE_RELEASE_NOTES: true
# Needed as skip_upload will properly work only on future version of helm/chart-releaser-action
continue-on-error: true
with:
charts_dir: charts
- name: Push Charts to GHCR
if: ${{ always() }}
env:
OCI_REGISTRY: "oci://ghcr.io/${{ github.repository }}"
run: |
for pkg in .cr-release-packages/*; do
if [ -z "${pkg:-}" ]; then
break
fi
helm push "${pkg}" "${OCI_REGISTRY}"
done