File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ name : Build and publish helm charts
2+
3+ on :
4+ push :
5+ branches :
6+ - dls
7+
8+ env :
9+ HELM_VERSION_TO_INSTALL : 3.18.3
10+
11+ jobs :
12+ build-and-push-helm-charts :
13+ name : publish helm charts to ghcr.io
14+ runs-on : ubuntu-latest
15+ steps :
16+ - name : Checkout
17+ uses : actions/checkout@v2
18+
19+ - name : install helm
20+ uses : Azure/setup-helm@v3
21+ with :
22+ version : ${{ env.HELM_VERSION_TO_INSTALL }}
23+
24+ - name : push the helm chart
25+ run : |
26+ echo ${{ secrets.GITHUB_TOKEN }} | helm registry login ghcr.io/${{ github.repository_owner }} --username ${{ github.repository_owner }} --password-stdin
27+
28+ REGISTRY=oci://ghcr.io/DiamondLightSource/user-office-helm
29+ CHARTS=$(realpath backend/duo-backend factory/duo-factory frontend/duo-frontend gateway/duo-gateway scheduler-backend/duo-scheduler-backend scheduler-frontend/duo-scheduler-frontend user-office-app)
30+
31+ set -x
32+
33+ TAG=0.1.0-dls+$(git describe --always)
34+ echo "Charts will be released as version: ${TAG}"
35+
36+ for chart in $CHARTS; do
37+ (
38+ cd $chart
39+ NAME=$(sed -n '/^name: */s///p' Chart.yaml)
40+
41+ helm package -u --app-version ${TAG} --version ${TAG} .
42+ PACKAGE=${NAME}-${TAG}.tgz
43+
44+ helm push "$PACKAGE" $REGISTRY
45+ )
46+ done
You can’t perform that action at this time.
0 commit comments