From 657730eaf0cf4b861e50067aaf2f485ae686b041 Mon Sep 17 00:00:00 2001 From: Markus Pesch Date: Sun, 12 Jan 2025 16:29:44 +0100 Subject: [PATCH] adasd --- .gitea/workflows/release.yaml | 39 ++++++++++++++++++----------------- 1 file changed, 20 insertions(+), 19 deletions(-) diff --git a/.gitea/workflows/release.yaml b/.gitea/workflows/release.yaml index be8d48e..51e72b1 100644 --- a/.gitea/workflows/release.yaml +++ b/.gitea/workflows/release.yaml @@ -16,29 +16,30 @@ jobs: apk update apk add git npm - uses: actions/checkout@v4 - # - name: Import GPG key - # id: import_gpg - # uses: https://github.com/crazy-max/ghaction-import-gpg@v6 - # with: - # gpg_private_key: ${{ secrets.GPGSIGN_KEY }} - # passphrase: ${{ secrets.GPGSIGN_PASSPHRASE }} - # fingerprint: CC64B1DB67ABBEECAB24B6455FC346329753F4B0 - - # Using helm gpg plugin as 'helm package --sign' has issues with gpg2: https://github.com/helm/helm/issues/2843 - - name: package chart + - name: Package chart env: - HELM_REPO_NAME: test - HELM_REPO_PASSWORD: ${{ secrets.HELM_REPO_PASSWORD }} - HELM_REPO_USERNAME: ${{ secrets.HELM_REPO_USERNAME }} - HELM_SERVER_HOST: ${{ vars.HELM_SERVER_HOST }} + HELM_REPO_NAME: upload + + CHARTMUSEUM_PASSWORD: ${{ secrets.CHARTMUSEUM_PASSWORD }} + CHARTMUSEUM_USERNAME: ${{ secrets.CHARTMUSEUM_USERNAME }} + CHARTMUSEUM_HOSTNAME: ${{ vars.CHARTMUSEUM_HOSTNAME }} + + GITEA_PACKAGE_REGISTRY_TOKEN: ${{ secrets.GIT_CRYPTIC_SYSTEMS_PACKAGE_REGISTRY_TOKEN }} + GITEA_SERVER_URL: ${{ github.server_url }} run: | - REPOSITORY_NAME=$(echo ${GITHUB_REPOSITORY} | cut -d '/' -f 2) PACKAGE_VERSION=${GITHUB_REF#refs/tags/} + REPOSITORY_NAME=$(echo ${GITHUB_REPOSITORY} | cut -d '/' -f 2) + REPOSITORY_OWNER=$(echo ${GITHUB_REPOSITORY} | cut -d '/' -f 1) - echo $REPOSITORY_NAME - echo $PACKAGE_VERSION - - helm repo add ${HELM_REPO_NAME} https://${HELM_SERVER_HOST}/${HELM_REPO_NAME} helm dependency build helm package --version "${PACKAGE_VERSION}" ./ + + # chart-museum + helm repo add --username ${CHARTMUSEUM_USERNAME} --password ${CHARTMUSEUM_PASSWORD} ${HELM_REPO_NAME} https://${CHARTMUSEUM_HOSTNAME}/${HELM_REPO_NAME} helm cm-push ${REPOSITORY_NAME}-${PACKAGE_VERSION}.tgz ${HELM_REPO_NAME} + helm repo remove ${HELM_REPO_NAME} + + # gitea + helm repo add --username ${REPOSITORY_OWNER} --password ${GITEA_PACKAGE_REGISTRY_TOKEN} ${HELM_REPO_NAME} https://${GITEA_SERVER_URL}/api/packages/${REPOSITORY_OWNER}/helm + helm cm-push ${REPOSITORY_NAME}-${PACKAGE_VERSION}.tgz ${HELM_REPO_NAME} + helm repo remove ${HELM_REPO_NAME} \ No newline at end of file