wordpress-helm/.gitea/workflows/publish-new-helm-chart-version.yaml
Rebecca Valente 47c42f0430
Some checks failed
package-helm-chart / package-helm-chart (push) Failing after 2m49s
initial commit
2025-09-22 19:03:15 -03:00

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