name: Package and publish helm chart on: push: jobs: package-helm: runs-on: ubuntu-latest steps: - uses: actions/checkout@v3 name: Check out code - name: Set up Helm uses: azure/setup-helm@v4.2.0 with: version: v3.14.4 - name: Get package name id: chart_name uses: mikefarah/yq@master with: cmd: yq .name Chart.yaml - name: Get package version id: chart_version uses: mikefarah/yq@master with: cmd: yq .version Chart.yaml - name: Run helm lint on all changed charts shell: bash run: | helm dependency build helm lint . - name: build helm package if: gitea.ref == 'refs/heads/main' shell: bash env: PACKAGE_TOKEN: ${{ secrets.PACKAGE_TOKEN }} CHART_NAME: ${{ steps.chart_name.outputs.result }} CHART_VERSION: ${{ steps.chart_version.outputs.result }} run: | helm package . curl -H "Authorization: token $PACKAGE_TOKEN" -X POST --upload-file ${CHART_NAME}-${CHART_VERSION}.tgz https://git.rre.nu/api/packages/jonas/helm/api/charts