From 2b2c082b58094a6ace4ffea7f77346b182624c5d Mon Sep 17 00:00:00 2001 From: jonas Date: Tue, 12 Nov 2024 10:25:02 +0100 Subject: [PATCH] lint and only build on main --- .gitea/workflows/buildPush.yaml | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/.gitea/workflows/buildPush.yaml b/.gitea/workflows/buildPush.yaml index 3850eb0..f31b14a 100644 --- a/.gitea/workflows/buildPush.yaml +++ b/.gitea/workflows/buildPush.yaml @@ -29,15 +29,19 @@ jobs: with: cmd: yq .version Chart.yaml + - name: Run helm lint on all changed charts + shell: bash + run: | + helm dependency build + helm lint . + - name: build helm package + if: gitea.ref == 'refs/heads/main' shell: bash env: PACKAGE_TOKEN: ${{ secrets.PACKAGE_TOKEN }} CHART_NAME: ${{ steps.chart_name.outputs.result }} CHART_VERSION: ${{ steps.chart_version.outputs.result }} run: | - REPO_PATH=$(git rev-parse --show-toplevel) - mkdir /tmp/build - cd /tmp/build - helm package $REPO_PATH + helm package . curl -H "Authorization: token $PACKAGE_TOKEN" -X POST --upload-file ${CHART_NAME}-${CHART_VERSION}.tgz https://git.rre.nu/api/packages/jonas/helm/api/charts -- 2.45.2