diff --git a/.cr.yaml b/.cr.yaml new file mode 100644 index 0000000..3a57c9b --- /dev/null +++ b/.cr.yaml @@ -0,0 +1,4 @@ +owner: KubelanCloud +git-repo: kks-csi-plugin +pages-branch: gh-pages +pages-index-path: index.yaml diff --git a/.github/workflows/release-chart.yaml b/.github/workflows/release-chart.yaml new file mode 100644 index 0000000..b7f189e --- /dev/null +++ b/.github/workflows/release-chart.yaml @@ -0,0 +1,35 @@ +name: Release Chart + +on: + push: + branches: + - main + paths: + - charts/** + - .cr.yaml + - .github/workflows/release-chart.yaml + +permissions: + contents: 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: Run chart-releaser + uses: helm/chart-releaser-action@v1.7.0 + with: + charts_dir: charts + config: .cr.yaml + env: + CR_TOKEN: "${{ secrets.GITHUB_TOKEN }}" diff --git a/README.md b/README.md index 3d8ba50..27fb864 100644 --- a/README.md +++ b/README.md @@ -56,7 +56,22 @@ Driver name: `storage.csi.kloud.team` ## Install with Helm -Install the chart into each user cluster (typically `kube-system`): +### From the published chart repository + +Charts are published to GitHub Pages on each release: + +```bash +helm repo add kloud-csi https://kubelancloud.github.io/kks-csi-plugin +helm repo update + +helm install kloud-csi kloud-csi/kloud-csi \ + --namespace kube-system \ + --create-namespace \ + --set serverURL=https://csi.example.kloud.team \ + --set accessToken="YOUR_CLUSTER_CSI_ACCESS_TOKEN" +``` + +### From a local checkout ```bash helm install kloud-csi ./charts/kloud-csi \ @@ -93,6 +108,8 @@ kubectl get storageclass kloud-csi Chart path: [`charts/kloud-csi`](charts/kloud-csi) +Published releases are available at [GitHub Releases](https://github.com/KubelanCloud/kks-csi-plugin/releases) and via the Helm repository at `https://kubelancloud.github.io/kks-csi-plugin`. Bump `version` in [`Chart.yaml`](charts/kloud-csi/Chart.yaml) to publish a new chart release. + ### Required values | Value | Description |