name: Publish helm chart on: workflow_call: inputs: ci_image: required: true type: string description: image to use inside the workflow jobs default: git.romalex.cc/public/ci-image:v1 registry_user: required: true type: string description: username to access gitea registry default: ${{ github.actor }} secrets: registry_access_token: required: true description: Token to access the gitea registry jobs: lint: name: Lint Helm chart runs-on: romalex-public container: image: ${{ inputs.ci_image }} steps: - name: Checkout uses: actions/checkout@v4 - name: Lint run: helm lint . package: name: Package and publish helm chart runs-on: romalex-public container: image: ${{ inputs.ci_image }} needs: lint steps: - name: Checkout uses: actions/checkout@v4 - name: Cleanup run: | rm -rf .git rm -rf .gitea - name: Package run: helm package . - name: Publish run: | CHART_NAME=$(yq .name < Chart.yaml) CHART_VERSION=$(yq .version < Chart.yaml) curl -u ${{ inputs.registry_user }}:${{ secrets.registry_access_token }} \ -X POST \ --upload-file "${CHART_NAME}-${CHART_VERSION}.tgz" \ ${{ github.server_url }}/api/packages/${{ github.repository_owner }}/helm/api/charts