Compare commits
12 Commits
851c54d3cc
...
test_dep_b
Author | SHA1 | Date | |
---|---|---|---|
|
5fd7675ffb | ||
|
c5d44ffffa | ||
2180602e3a | |||
|
583643bcab | ||
|
e0864adab0 | ||
|
6cd276eaa3 | ||
|
0a72a599f7 | ||
|
5523cd61d1 | ||
|
c6c13e201b | ||
|
ba29643c98 | ||
|
7049e3fc4f | ||
|
9b04821db0 |
@@ -2,8 +2,7 @@ name: Package and publish helm chart
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
|
||||
jobs:
|
||||
package-helm:
|
||||
runs-on: ubuntu-latest
|
||||
@@ -27,10 +26,23 @@ jobs:
|
||||
dir_names_max_depth: '2'
|
||||
files: 'charts/**'
|
||||
|
||||
- name: build helm package
|
||||
- name: Run helm lint on all changed charts
|
||||
shell: bash
|
||||
env:
|
||||
PACKAGE_TOKEN: ${{ secrets.REPO_HOST }}
|
||||
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
|
||||
cd ${REPO_PATH}/${chart}
|
||||
helm dependency build
|
||||
helm lint .
|
||||
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 }}
|
||||
CHART_VERSION: ${{ steps.chart_version.outputs.result }}
|
||||
ALL_CHANGED_CHARTS: ${{ steps.changed-files.outputs.all_changed_files }}
|
||||
@@ -40,10 +52,7 @@ jobs:
|
||||
cd ${REPO_PATH}/${chart}
|
||||
CHART_NAME=$(yq .name Chart.yaml)
|
||||
CHART_VERSION=$(yq .version Chart.yaml)
|
||||
echo "Building dependancies for helm-chart"
|
||||
helm dependency build
|
||||
echo "Packaging ${CHART_NAME}-${CHART_VERSION}"
|
||||
helm package .
|
||||
echo "$(ls -l)"
|
||||
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
|
||||
done
|
||||
|
@@ -1,4 +1,4 @@
|
||||
#
|
||||
|
||||
image:
|
||||
repository: ghcr.io/home-assistant/home-assistant
|
||||
tag:
|
||||
|
Reference in New Issue
Block a user