Skip to content

Commit 63d0edc

Browse files
authored
ci: package and push helm chart in release-main workflow (#154)
1 parent 9be2a5d commit 63d0edc

2 files changed

Lines changed: 15 additions & 1 deletion

File tree

.github/workflows/release-main.yml

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Build and push docker image with latest tag
1+
name: Publish main branch artifact
22
on:
33
push:
44
branches: [ main ]
@@ -33,3 +33,13 @@ jobs:
3333
password: ${{ secrets.GITHUB_TOKEN }}
3434
- name: Build operator image
3535
run: make docker-buildx-latest
36+
- name: Install Helm
37+
run: curl https://raw.githubusercontent.com/helm/helm/main/scripts/get-helm-3 | bash
38+
- name: Set VERSION
39+
run: |
40+
FULL_VER=$(make -s print-full-version)
41+
echo "VERSION=${FULL_VER#v}" >> "$GITHUB_ENV" # strips 'v' → 0.0.3-d33b34f
42+
- name: Package and push helm chart
43+
run: |
44+
helm registry login ghcr.io -u ${{ github.actor }} -p ${{ secrets.GITHUB_TOKEN }}
45+
make push-helmchart

Makefile

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,10 @@ else
1313
FULL_VERSION := v$(VERSION)
1414
endif
1515

16+
.PHONY: print-full-version
17+
print-full-version: ## Print the computed full version
18+
@echo $(FULL_VERSION)
19+
1620
# CHANNELS define the bundle channels used in the bundle.
1721
# Add a new line here if you would like to change its default config. (E.g CHANNELS = "candidate,fast,stable")
1822
# To re-generate a bundle for other specific channels without changing the standard setup, you can:

0 commit comments

Comments
 (0)