Skip to content

Commit

Permalink
helm: makefile target for ghcr.io hosting
Browse files Browse the repository at this point in the history
Signed-off-by: Sakari Poussa <[email protected]>
  • Loading branch information
poussa committed Oct 30, 2024
1 parent 96af2ad commit b76c315
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
CHARTS_DIR := ./helm-charts
RELEASE_REGISTRY?=ghcr.io/opea-project
GIT_VERSION=$(shell git describe --tags --always --match "v*")
RELEASE_VERSION?=$(GIT_VERSION)
CHART_VERSION?=$(shell echo $(GIT_VERSION) | sed 's/^v//')

.PHONY: test

Expand All @@ -10,3 +14,11 @@ test:

pre-commit:
@pre-commit run --all-files

.PHONY: helm-push
helm-push:
@for chart in $$(find $(CHARTS_DIR) -maxdepth 2 -type f -name "Chart.yaml" | cut -d "/" -f 3); do \
helm dependency update $(CHARTS_DIR)/$$(chart) ; \
helm package $(CHARTS_DIR)/$$chart --version $(CHART_VERSION) --app-version $(RELEASE_VERSION) --destination .charts ;\
helm push .charts/$$chart-$(CHART_VERSION).tgz oci://${RELEASE_REGISTRY}/charts ;\
done

0 comments on commit b76c315

Please sign in to comment.