diff --git a/.gitea/workflows/helm.yaml b/.gitea/workflows/helm.yaml index 1e4ebb8..5e025b8 100644 --- a/.gitea/workflows/helm.yaml +++ b/.gitea/workflows/helm.yaml @@ -17,17 +17,6 @@ jobs: run: | apk update apk add git npm - - name: Check if files were touched - uses: dorny/paths-filter@v3.0.2 - id: changes - with: - filters: | - yaml: - - '**/*.yaml' - - '**/*.yml' - - name: Skip further steps, when condition is not met - if: steps.filter.outputs.yaml == 'false' - run: exit 0 - uses: actions/checkout@v4.2.2 - name: Lint helm files run: | @@ -44,17 +33,6 @@ jobs: apk update apk add git npm - uses: actions/checkout@v4.2.2 - - name: Check if files were touched - uses: dorny/paths-filter@v3.0.2 - id: changes - with: - filters: | - yaml: - - '**/*.yaml' - - '**/*.yml' - - name: Skip further steps, when condition is not met - if: steps.filter.outputs.yaml == 'false' - run: exit 0 - name: Unittest run: | helm unittest --strict --file 'unittests/**/*.yaml' ./ \ No newline at end of file diff --git a/.gitea/workflows/release.yaml b/.gitea/workflows/release.yaml index 379e8c6..e3a3e04 100644 --- a/.gitea/workflows/release.yaml +++ b/.gitea/workflows/release.yaml @@ -11,20 +11,11 @@ env: jobs: generate-chart-publish: + container: + image: docker.io/volkerraschek/helm:3.16.1 runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - - name: install tools - run: | - apt update --yes - apt install --yes curl ca-certificates curl gnupg - # helm - curl --location --output helm-v${HELM_VERSION}-linux-amd64.tar.gz https://get.helm.sh/helm-v${HELM_VERSION}-linux-amd64.tar.gz - tar --extract --gzip --file helm-v${HELM_VERSION}-linux-amd64.tar.gz - mv linux-amd64/helm /usr/local/bin/ - rm -rf linux-amd64 helm-v${HELM_VERSION}-linux-amd64.tar.gz - helm version - # - name: Import GPG key # id: import_gpg # uses: https://github.com/crazy-max/ghaction-import-gpg@v6 @@ -35,14 +26,15 @@ jobs: # Using helm gpg plugin as 'helm package --sign' has issues with gpg2: https://github.com/helm/helm/issues/2843 - name: package chart + env: + HELM_REPO_NAME: test + HELM_REPO_PASSWORD: ${{ secrets.HELM_REPO_PASSWORD }} + HELM_REPO_USERNAME: ${{ secrets.HELM_REPO_USERNAME }} run: | + REPOSITORY_NAME=$(echo ${GITHUB_REPOSITORY} | cut -d '/' -f 2) + PACKAGE_VERSION=${GITHUB_REF#refs/tags/v} + + helm repo add ${HELM_REPO_NAME} https://charts.cryptic.systems/${HELM_REPO_NAME} helm dependency build - helm package --version "${GITHUB_REF#refs/tags/v}" ./ - # mkdir gitea - # mv gitea*.tgz gitea/ - # curl -s -L -o gitea/index.yaml https://dl.gitea.com/charts/index.yaml - # helm repo index gitea/ --url https://dl.gitea.com/charts --merge gitea/index.yaml - # # push to dockerhub - # echo ${{ secrets.DOCKER_CHARTS_PASSWORD }} | helm registry login -u ${{ secrets.DOCKER_CHARTS_USERNAME }} registry-1.docker.io --password-stdin - # helm push gitea/gitea-${GITHUB_REF#refs/tags/v}.tgz oci://registry-1.docker.io/giteacharts - # helm registry logout registry-1.docker.io + helm package --version "${PACKAGE_VERSION}" ./ + helm cm-push ${REPOSITORY_NAME}-${PACKAGE_VERSION}.tgz ${HELM_REPO_NAME}