Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 36 additions & 0 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,21 @@ jobs:
git tag -s -m "Release ${TAG}" "${TAG}"
git push origin "${TAG}"

- name: Create release branch
env:
VERSION: ${{ steps.version.outputs.version }}
GH_TOKEN: ${{ steps.app-token.outputs.token }}
run: |
BRANCH="release-${VERSION%.*}"
if gh api "repos/${GITHUB_REPOSITORY}/branches/${BRANCH}" >/dev/null 2>&1; then
echo "Branch ${BRANCH} already exists, skipping"
else
SHA=$(git rev-parse HEAD)
gh api "repos/${GITHUB_REPOSITORY}/git/refs" \
-f "ref=refs/heads/${BRANCH}" \
-f "sha=${SHA}"
fi

- name: Set up Go
uses: actions/setup-go@b7ad1dad31e06c5925ef5d2fc7ad053ef454303e # v7.0.0
with:
Expand All @@ -113,16 +128,37 @@ jobs:
TAG: ${{ steps.version.outputs.tag }}
run: make release-manifest IMG="${IMAGE}:${TAG}"

- name: Package and push Helm chart
env:
VERSION: ${{ steps.version.outputs.version }}
TAG: ${{ steps.version.outputs.tag }}
ACTOR: ${{ github.actor }}
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
make helm
./bin/yq -i ".version = \"${VERSION}\"" chart/bootc-operator/Chart.yaml
./bin/yq -i ".appVersion = \"${TAG}\"" chart/bootc-operator/Chart.yaml
helm package chart/bootc-operator
helm registry login -u "${ACTOR}" -p "${GH_TOKEN}" ghcr.io
helm push "bootc-operator-${VERSION}.tgz" oci://ghcr.io/${{ github.repository }}/charts

- name: Create release
env:
GH_TOKEN: ${{ steps.app-token.outputs.token }}
TAG: ${{ steps.version.outputs.tag }}
run: |
{
printf '## Installation\n\n'
printf '### kubectl\n\n'
printf '```bash\n'
printf 'kubectl apply -f https://github.com/%s/releases/download/%s/install.yaml\n' \
"${GITHUB_REPOSITORY}" "${TAG}"
printf '```\n\n'
printf '### Helm\n\n'
printf '```bash\n'
printf 'helm install bootc-operator oci://ghcr.io/%s/charts/bootc-operator --version %s \\\n' \
"${GITHUB_REPOSITORY}" "${TAG#v}"
printf ' --create-namespace --namespace bootc-operator\n'
printf '```\n'
} > notes.md
gh release create "${TAG}" \
Expand Down
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.1.0
0.2.0

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

idk why is this showing 0.1.0 but we were on 0.1.1

@alicefr alicefr Oct 6, 2026 •

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Because we did the bump of the version in the release-0.1 branch only. It was a minor release

@alicefr alicefr Oct 6, 2026 •

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The release branches will start to diverge

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We would only have the major release bumps

17 changes: 17 additions & 0 deletions docs/src/helm.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,23 @@

## Install

Install from the OCI registry:

```bash
helm install bootc-operator oci://ghcr.io/bootc-dev/bootc-operator/charts/bootc-operator \
--create-namespace --namespace bootc-operator
```

To install a specific version:

```bash
helm install bootc-operator oci://ghcr.io/bootc-dev/bootc-operator/charts/bootc-operator \
--version 0.1.0 \
--create-namespace --namespace bootc-operator
```

Alternatively, install from a local checkout:

```bash
helm install bootc-operator ./chart/bootc-operator \
--create-namespace --namespace bootc-operator
Expand Down
18 changes: 13 additions & 5 deletions hack/sync-helm.sh
Original file line number Diff line number Diff line change
Expand Up @@ -56,14 +56,16 @@ gen_workload() {
.metadata.namespace = \"HELM_NAMESPACE\" |
.spec.template.spec.serviceAccountName = \"HELM_FULLNAME-${name}\" |
.spec.template.spec.containers[0].image = \"HELM_IMAGE\" |
del(.metadata.labels.\"app.kubernetes.io/managed-by\") |
del(.metadata.labels) |
.metadata.labels.HELM_LABELS_PLACEHOLDER = true |
del(.spec.template.spec.containers[0].volumeMounts | select(length == 0)) |
del(.spec.template.spec.volumes | select(length == 0)) |
... comments=\"\"
" "$source" | sed \
-e 's/HELM_FULLNAME/{{ include "bootc-operator.fullname" . }}/g' \
-e 's/HELM_NAMESPACE/{{ .Release.Namespace }}/g' \
-e 's/HELM_IMAGE/{{ include "bootc-operator.image" . }}/g' \
-e '/HELM_LABELS_PLACEHOLDER/c\ {{- include "bootc-operator.labels" . | nindent 4 }}' \
> "$output"

sed -i '/image: {{ include "bootc-operator\.image" \. }}/a\
Expand Down Expand Up @@ -105,11 +107,14 @@ gen_binding() {

"$YQ" -I2 "
.metadata.name = \"HELM_FULLNAME-${name}\" |
del(.metadata.labels.\"app.kubernetes.io/managed-by\") |
del(.metadata.labels) |
.metadata.labels.HELM_LABELS_PLACEHOLDER = true |
.roleRef.name = \"HELM_FULLNAME-${role_suffix}\" |
.subjects[0].name = \"HELM_FULLNAME-${sa_suffix}\" |
.subjects[0].namespace = \"HELM_NAMESPACE\"
" "$source" | helm_sed > "$output"
" "$source" | helm_sed | sed \
-e '/HELM_LABELS_PLACEHOLDER/c\ {{- include "bootc-operator.labels" . | nindent 4 }}' \
> "$output"
}

gen_binding "$CONFIG_DIR/rbac/role_binding.yaml" \
Expand All @@ -129,8 +134,11 @@ gen_sa() {
"$YQ" -I2 "
.metadata.name = \"HELM_FULLNAME-${name}\" |
.metadata.namespace = \"HELM_NAMESPACE\" |
del(.metadata.labels.\"app.kubernetes.io/managed-by\")
" "$source" | helm_sed > "$output"
del(.metadata.labels) |
.metadata.labels.HELM_LABELS_PLACEHOLDER = true
" "$source" | helm_sed | sed \
-e '/HELM_LABELS_PLACEHOLDER/c\ {{- include "bootc-operator.labels" . | nindent 4 }}' \
> "$output"
}

gen_sa "$CONFIG_DIR/rbac/controller_service_account.yaml" \
Expand Down
Loading