diff --git a/.gitea/workflows/helm-lint.yaml b/.gitea/workflows/helm-lint.yaml index 6cbf057..caeb171 100644 --- a/.gitea/workflows/helm-lint.yaml +++ b/.gitea/workflows/helm-lint.yaml @@ -1,23 +1,19 @@ -name: Test Helm Chart - -on: - push: - branches: - - main - pull_request: - -jobs: - helm-lint: + publish-helm: runs-on: docker container: image: alpine/helm:3.14.0 steps: - - name: Clone repo manually + - name: Clone repo run: | echo "Cloning repository $GITHUB_REPOSITORY..." - git clone "${GITHUB_SERVER_URL}/${GITHUB_REPOSITORY}.git" "$GITHUB_WORKSPACE" + git clone "https://${{ secrets.REPO_USER }}:${{ secrets.REPO_TOKEN }}@${GITHUB_SERVER_URL#https://}/${GITHUB_REPOSITORY}.git" $GITHUB_WORKSPACE cd "$GITHUB_WORKSPACE" - - name: Run Helm lint + - name: Lint and package Helm chart run: | - helm lint "$GITHUB_WORKSPACE/" + helm lint . + helm package . -d charts + + - name: Publish Helm chart + run: | + curl --user ${{ secrets.REPO_USER }}:${{ secrets.REPO_TOKEN }} -X POST --upload-file charts/duino-miner-0.1.1.tgz $GITHUB_SERVER_URL/api/packages/${{ secrets.REPO_USER }}/helm/api/charts