35 lines
988 B
YAML
35 lines
988 B
YAML
name: package-helm-chart
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- trunk
|
|
paths:
|
|
- 'charts/**'
|
|
|
|
jobs:
|
|
package-helm-chart:
|
|
runs-on: ubuntu-latest
|
|
container:
|
|
image: rbvtopudding/devops:latest
|
|
steps:
|
|
- name: Checkout code
|
|
uses: actions/checkout@v3
|
|
|
|
- name: Package and push helm chart
|
|
run: |
|
|
export VERSION=$(cat ./charts/${{ vars.REPOSITORY_NAME }}/Chart.yaml | grep -m 1 version | cut -d: -f2 | tr -d '[:space:]')
|
|
helm plugin install https://github.com/chartmuseum/helm-push
|
|
|
|
helm package \
|
|
./charts/${{ vars.REPOSITORY_NAME }} \
|
|
--version $VERSION
|
|
|
|
helm repo add \
|
|
--username ${{ secrets.HELM_REGISTRY_PUBLISH_USERNAME }} \
|
|
--password ${{ secrets.HELM_REGISTRY_PUBLISH_TOKEN }} \
|
|
default \
|
|
https://git.puddi.ng/api/packages/public-templates/helm
|
|
|
|
helm cm-push ./${{ vars.REPOSITORY_NAME }}-${VERSION}.tgz default
|