name: Helm Chart Build and Publish on: push: branches: - master jobs: build-and-publish: runs-on: ubuntu-latest steps: - name: Checkout code uses: actions/checkout@v2 - name: Set up Helm run: | curl https://raw.githubusercontent.com/helm/helm/main/scripts/get-helm-3 | bash - name: Build Helm Chart run: | helm package . --destination ./charts - name: Publish Helm Chart to registry env: HELM_REGISTRY: "https://git.leece.im/api/packages/${{ secrets.REGISTRY_USERNAME }}/helm/api/charts" USERNAME: ${{ secrets.REGISTRY_USERNAME }} PASSWORD: ${{ secrets.REGISTRY_PASSWORD }} run: | curl --user $USERNAME:$PASSWORD -X POST --upload-file ./charts/*.tgz $HELM_REGISTRY