Skip to content

Commit

Permalink
Merge pull request #143 from openstad/ci/helm-chart-releaser
Browse files Browse the repository at this point in the history
feat: add helm chart release action to publish helm chart
  • Loading branch information
Badmuts authored Jan 24, 2024
2 parents c3112a6 + ff56f6b commit 6d09149
Show file tree
Hide file tree
Showing 2 changed files with 45 additions and 1 deletion.
44 changes: 44 additions & 0 deletions .github/workflows/helm-chart-release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
name: Release Helm 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 "[email protected]"
- name: Install Helm
uses: azure/setup-helm@v3
with:
version: v3.5.4

- name: Helm Deps
run: |
for dir in $(ls -d charts/*/); do
helm dependency list $dir 2> /dev/null | tail +2 | head -n -1 | awk '{ print "helm repo add " $1 " " $3 }' | while read cmd; do $cmd; done
done
- name: Run chart-releaser
uses: helm/[email protected]
env:
CR_TOKEN: '${{ secrets.GITHUB_TOKEN }}'
with:
charts_dir: charts
2 changes: 1 addition & 1 deletion charts/openstad-headless/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
apiVersion: v2
name: openstad-headless
description: A Helm chart for Kubernetes
description: Openstad Headless Helm chart for Kubernetes

# A chart can be either an 'application' or a 'library' chart.
#
Expand Down

0 comments on commit 6d09149

Please sign in to comment.