Skip to content

Commit 22c03f5

Browse files
authored
fix(ci): template CRDs apart of the chart package process (#5)
--------- Signed-off-by: Anthony Rabbito <arabbito@coreweave.com>
1 parent 303d4f4 commit 22c03f5

File tree

2 files changed

+15
-1
lines changed

2 files changed

+15
-1
lines changed

.github/workflows/publish-chart.yaml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,8 +40,23 @@ jobs:
4040
- name: Install Helm
4141
uses: azure/setup-helm@v4
4242

43+
- name: Package CRDs
44+
shell: bash
45+
run: |
46+
cat <<EOF > cmd/k8s-operator/deploy/chart/templates/crds.yaml
47+
{{- if .Values.installCRDs }}
48+
EOF
49+
for file in cmd/k8s-operator/deploy/crds/*.yaml; do
50+
echo "---" >> cmd/k8s-operator/deploy/chart/templates/crds.yaml
51+
cat "$file" >> cmd/k8s-operator/deploy/chart/templates/crds.yaml
52+
done
53+
cat <<EOF >> cmd/k8s-operator/deploy/chart/templates/crds.yaml
54+
{{- end }}
55+
EOF
56+
4357
- name: Package & Push Helm Charts
4458
shell: bash
59+
if: ${{ always() && format('refs/heads/{0}', github.event.repository.default_branch) == github.ref }}
4560
run: |
4661
helm package cmd/k8s-operator/deploy/chart --dependency-update --version ${{ env.HELM_VERSION }} --app-version ${{ env.HELM_VERSION }}
4762
pkg=$(ls tailscale-operator-*.tgz)

.github/workflows/publish-image.yaml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ on:
88
types: ["opened", "synchronize", "reopened"]
99
paths:
1010
- .github/workflows/publish-image.yaml
11-
- "**/*"
1211
push:
1312
branches:
1413
- coreweave

0 commit comments

Comments
 (0)