From 2a95e63094de4d9bdfe36c400b1fc94aba75b785 Mon Sep 17 00:00:00 2001 From: rasta-rocket Date: Sun, 15 Jan 2023 00:23:22 +0100 Subject: [PATCH] feat: add workflow to release helm chart --- .github/workflows/release.yml | 34 ++++++++++++++++++++++++++++++++++ charts/README.md | 10 ++++------ 2 files changed, 38 insertions(+), 6 deletions(-) create mode 100644 .github/workflows/release.yml diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..bd48367 --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,34 @@ +name: Release Charts + +on: + push: + branches: + - main + paths: + - 'charts/**' + +jobs: + release: + # depending on default permission settings for your org (contents being read-only or read-write for workloads), you will have to add permissions + # see: https://docs.github.com/en/actions/security-guides/automatic-token-authentication#modifying-the-permissions-for-the-github_token + permissions: + contents: write + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v3 + 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@v3 + + - name: Run chart-releaser + uses: helm/chart-releaser-action@v1.5.0 + env: + CR_TOKEN: "${{ secrets.GITHUB_TOKEN }}" diff --git a/charts/README.md b/charts/README.md index abb9ceb..d83340c 100644 --- a/charts/README.md +++ b/charts/README.md @@ -15,14 +15,12 @@ $ helm install -f examples/override.yaml sendgrid-stats-exporter ./ ### Remote -[helm-git](https://github.com/aslafy-z/helm-git) plugin is required. - ``` -$ helm repo add sendgrid-stats-exporter 'git+https://github.com/chatwork/sendgrid-stats-exporter@charts?ref=0.0.8' -$ helm install -f examples/override.yaml sendgrid-stats-exporter +$ helm repo add sendgrid-stats-exporter 'https://chatwork.github.io/sendgrid-stats-exporter' +$ helm install -f examples/override.yaml sendgrid-stats-exporter/sendgrid-stats-exporter ``` -### Test +### Test ``` $ kubectl get svc @@ -76,4 +74,4 @@ The following table lists the configurable parameters of the Sendgrid-stats-expo | `affinity` | Node/Pod affinities | `{}` | --- -_Documentation generated by [Frigate](https://frigate.readthedocs.io)._ \ No newline at end of file +_Documentation generated by [Frigate](https://frigate.readthedocs.io)._