-
Notifications
You must be signed in to change notification settings - Fork 7
Expand file tree
/
Copy pathMakefile
More file actions
23 lines (18 loc) · 807 Bytes
/
Makefile
File metadata and controls
23 lines (18 loc) · 807 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
## Makefile for packaging and publishing the memos Helm chart
# Usage:
# make package # create a .tgz chart package
# make oci-save # save chart as OCI artifact locally
# make oci-push # push chart to GHCR (requires CR_PAT and USER env vars)
VERSION ?= $(shell grep '^version:' Chart.yaml | head -1 | awk '{print $$2}')
CHART_NAME := memos
OCI_REPO ?= ghcr.io/usememos/$(CHART_NAME)
.PHONY: package oci-save oci-push
package:
helm package .
oci-save:
helm chart save . $(OCI_REPO):$(VERSION)
oci-push:
# Requires environment variables: USER and CR_PAT (or use your username and a PAT)
@if [ -z "$(CR_PAT)" ]; then echo "CR_PAT environment variable is required to push to GHCR"; exit 1; fi
helm registry login ghcr.io -u $(USER) -p $(CR_PAT)
helm chart push $(OCI_REPO):$(VERSION)