Skip to content

Commit 34a60a9

Browse files
committed
Simplify chart package and publishing
1 parent b723f97 commit 34a60a9

File tree

1 file changed

+4
-33
lines changed

1 file changed

+4
-33
lines changed

.github/workflows/_helm.yml

Lines changed: 4 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -36,37 +36,8 @@ jobs:
3636
exit 1
3737
fi
3838
39-
- name: Package helm charts
40-
env:
41-
VERSION: "${{ github.ref_type == 'tag' && github.ref_name || '0.0.0' }}"
42-
run: |
43-
set -xe
44-
45-
mkdir -p charts
46-
for i in $(find Charts -type d -maxdepth 1 -mindepth 1); do
47-
if [[ ${i} =~ ^.*-ioc$ ]]; then
48-
echo "Skipping IOC schema chart: ${i}"
49-
continue
50-
fi
51-
echo "Packaging chart: ${i}"
52-
helm package -u --app-version ${VERSION} --version ${VERSION} ${i}
53-
mv $(basename ${i})-*.tgz charts/
54-
done
55-
56-
- name: Upload helm chart values schemas
57-
uses: actions/upload-artifact@v4
58-
with:
59-
name: helm-chart-schemas
60-
path: schemas/*
61-
62-
- name: Push tagged helm chart to registry
63-
# TODO - switch to using https://github.com/helm/chart-releaser-action of maybe the docker action?
64-
if: ${{ github.ref_type == 'tag' }}
39+
- name: package chart and push it
6540
run: |
66-
set -x
67-
68-
echo "${{ secrets.GITHUB_TOKEN }}" | helm registry login ghcr.io/${{ github.repository_owner }} --username ${{ github.repository_owner }} --password-stdin
69-
REGISTRY=oci://ghcr.io/${{github.repository_owner }}/charts
70-
for i in charts/*.tgz; do
71-
helm push "${i}" ${REGISTRY,,}
72-
done
41+
helm dependencies update Charts/glazed
42+
helm package Charts/glazed --version ${GITHUB_REF##*/} --app-version ${GITHUB_REF##*/} -d /tmp/
43+
helm push /tmp/glazed-${GITHUB_REF##*/}.tgz oci://ghcr.io/diamondlightsource/charts

0 commit comments

Comments
 (0)