From 0a72a599f7ac35bdf845c8fd4908d0d2c69b0aac Mon Sep 17 00:00:00 2001 From: Jonas Forsberg Date: Mon, 11 Nov 2024 16:02:40 +0100 Subject: [PATCH 1/4] added linting, only build on main branch --- .gitea/workflows/buildcharts.yaml | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/.gitea/workflows/buildcharts.yaml b/.gitea/workflows/buildcharts.yaml index 33aec68..fb446c3 100644 --- a/.gitea/workflows/buildcharts.yaml +++ b/.gitea/workflows/buildcharts.yaml @@ -2,8 +2,7 @@ name: Package and publish helm chart on: push: - branches: - - main + jobs: package-helm: runs-on: ubuntu-latest @@ -27,8 +26,19 @@ jobs: dir_names_max_depth: '2' files: 'charts/**' + - name: Run helm lint on all changed charts + shell: bash + env: + ALL_CHANGED_CHARTS: ${{ steps.changed-files.outputs.all_changed_files }} + run: | + REPO_PATH=$(git rev-parse --show-toplevel) + for chart in ${ALL_CHANGED_CHARTS}; do + helm lint ${chart} + done + - name: build helm package shell: bash + if: gitea.ref == 'refs/heads/main' env: PACKAGE_TOKEN: ${{ secrets.PACKAGE_TOKEN }} CHART_NAME: ${{ steps.chart_name.outputs.result }} From 6cd276eaa37380107c6f0baa2a1b2553119ee0b5 Mon Sep 17 00:00:00 2001 From: Jonas Forsberg Date: Mon, 11 Nov 2024 16:03:36 +0100 Subject: [PATCH 2/4] trigger pipeline --- charts/home-assistant/values.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/charts/home-assistant/values.yaml b/charts/home-assistant/values.yaml index 1433e61..e17f25c 100644 --- a/charts/home-assistant/values.yaml +++ b/charts/home-assistant/values.yaml @@ -1,4 +1,5 @@ + image: repository: ghcr.io/home-assistant/home-assistant tag: From e0864adab0161310d83831310f038bb43ccdb475 Mon Sep 17 00:00:00 2001 From: Jonas Forsberg Date: Mon, 11 Nov 2024 16:06:03 +0100 Subject: [PATCH 3/4] added dependecy build --- .gitea/workflows/buildcharts.yaml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.gitea/workflows/buildcharts.yaml b/.gitea/workflows/buildcharts.yaml index fb446c3..3129036 100644 --- a/.gitea/workflows/buildcharts.yaml +++ b/.gitea/workflows/buildcharts.yaml @@ -33,7 +33,9 @@ jobs: run: | REPO_PATH=$(git rev-parse --show-toplevel) for chart in ${ALL_CHANGED_CHARTS}; do - helm lint ${chart} + cd ${REPO_PATH}/${chart} + helm dependency build + helm lint . done - name: build helm package From 583643bcab41b20ab068046fd6daacc0a8200a64 Mon Sep 17 00:00:00 2001 From: Jonas Forsberg Date: Mon, 11 Nov 2024 16:06:32 +0100 Subject: [PATCH 4/4] trigger pipeline --- charts/home-assistant/values.yaml | 2 -- 1 file changed, 2 deletions(-) diff --git a/charts/home-assistant/values.yaml b/charts/home-assistant/values.yaml index e17f25c..fe8b92d 100644 --- a/charts/home-assistant/values.yaml +++ b/charts/home-assistant/values.yaml @@ -1,5 +1,3 @@ - - image: repository: ghcr.io/home-assistant/home-assistant tag: