Files
kks-provider-plugin/.github/workflows/release-chart.yaml
T
joshandCursor feec8c1e60 Fix chart image pulls for kloud-csi installs.
Use a valid livenessprobe tag, default the driver image to appVersion, add imagePullSecrets support, and publish GHCR packages as public after CI builds.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-06 06:35:51 +03:30

68 lines
1.7 KiB
YAML

name: Release Chart
on:
push:
branches:
- main
paths:
- charts/**
- .cr.yaml
- .github/workflows/release-chart.yaml
workflow_dispatch:
permissions:
contents: write
packages: write
jobs:
release:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Configure Git
run: |
git config user.name "$GITHUB_ACTOR"
git config user.email "$GITHUB_ACTOR@users.noreply.github.com"
- name: Install Helm
uses: azure/setup-helm@v4
- name: Run chart-releaser
uses: helm/chart-releaser-action@v1.7.0
with:
charts_dir: charts
config: .cr.yaml
env:
CR_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
- name: Log in to GHCR
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Push chart to OCI registry
run: |
shopt -s nullglob
charts=(.cr-release-packages/*.tgz)
if [ ${#charts[@]} -eq 0 ]; then
echo "No packaged charts to push"
exit 0
fi
owner=$(echo "${GITHUB_REPOSITORY_OWNER}" | tr '[:upper:]' '[:lower:]')
for chart in "${charts[@]}"; do
helm push "$chart" "oci://ghcr.io/${owner}/charts"
done
- name: Make OCI chart public
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
owner=$(echo "${GITHUB_REPOSITORY_OWNER}" | tr '[:upper:]' '[:lower:]')
gh api --method PATCH "/orgs/${owner}/packages/container/charts%2Fkloud-csi/visibility" -f visibility=public || true