Skip to content

Commit

Permalink
add branch chart version updates for releases
Browse files Browse the repository at this point in the history
  • Loading branch information
mikemrm committed Dec 8, 2024
1 parent aa577da commit 8649660
Show file tree
Hide file tree
Showing 8 changed files with 320 additions and 23 deletions.
31 changes: 9 additions & 22 deletions .github/workflows/helm-release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,14 @@ name: Release Helm

on:
push:
branches:
- 'releases/*/v*'
tags:
- '*/v*'

jobs:
release:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: Checkout
uses: actions/checkout@v4
Expand All @@ -34,25 +36,10 @@ jobs:
chart_version=$(cut -d / -f 5- <<<"${{ github.ref }}")
EOF
- name: Update chart version
- name: Package chart
run: |
chart_file="${{ steps.chart_meta.outputs.chart_name }}/Chart.yaml"
helm package "${{ steps.chart_meta.outputs.chart_name }}" --version "${{ steps.chart_meta.outputs.chart_version }}"
yq '.version = "${{ steps.chart_meta.outputs.chart_version }}"' \
"${chart_file}" > "${chart_file}.updated"
if diff -q "${chart_file}" "${chart_file}.updated"; then
mv -f "${chart_file}.update" "${chart_file}"
fi
make helm-docs
make diff
# - name: Package chart
# run: |
# helm package "${{ steps.chart_meta.outputs.chart_name }}" --version "${{ steps.chart_meta.outputs.chart_version }}"

# - name: Upload chart
# run: |
# helm push "${{ steps.chart_meta.outputs.chart_name }}-${{ steps.chart_meta.outputs.chart_version }}.tgz" oci://mrmhub.io/mikemrm
- name: Upload chart
run: |
helm push "${{ steps.chart_meta.outputs.chart_name }}-${{ steps.chart_meta.outputs.chart_version }}.tgz" oci://mrmhub.io/mikemrm
56 changes: 56 additions & 0 deletions .github/workflows/update-version.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
name: Update Version

on:
push:
branches:
- 'releases/*/v*'

jobs:
release:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Install yq
uses: mikefarah/yq@v4.44.6

- name: Configure chart version
id: chart_meta
run: |
cat >> "$GITHUB_OUTPUT" <<EOF
chart_name=$(cut -d / -f 4 <<<"${{ github.ref }}")
chart_version=$(cut -d / -f 5- <<<"${{ github.ref }}")
EOF
- name: Update chart version
run: |
git config --global user.name "${GITHUB_ACTOR}"
git config --global user.email "${GITHUB_ACTOR_ID}+${GITHUB_ACTOR}@users.noreply.github.com"
chart_file="${{ steps.chart_meta.outputs.chart_name }}/Chart.yaml"
yq '.version = "${{ steps.chart_meta.outputs.chart_version }}"' \
"${chart_file}" > "${chart_file}.updated"
if ! diff -q "${chart_file}" "${chart_file}.updated"; then
mv -f "${chart_file}.updated" "${chart_file}"
fi
if ! git --no-pager diff --exit-code; then
git commit -a -m 'chart version updated'
fi
make helm-docs
if ! git --no-pager diff --exit-code; then
git commit -a -m 'chart docs updated'
fi
if ! git --no-pager diff --exit-code "origin/${{ github.ref_name }}"..HEAD; then
git push origin "${{ github.ref_name }}"
fi
4 changes: 4 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
.PHONY: helm-docs

helm-docs:
@go run github.com/norwoodj/helm-docs/cmd/helm-docs@latest --template-files=./README.md.gotmpl
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,4 @@ dependencies:
- name: CHART_NAME
repository: 'oci://mrmhub.io/mikemrm'
version: v0.1.0
```
```
31 changes: 31 additions & 0 deletions README.md.gotmpl
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
{{ template "chart.header" . }}
{{ template "chart.deprecationWarning" . }}

{{ template "chart.badgesSection" . }}

{{ template "chart.description" . }}

## Usage

Direct URL: `oci://mrmhub.io/mikemrm/{{ template "chart.name" . }}`

Chart Dependency:

```yaml
dependencies:
- name: {{ template "chart.name" . }}
repository: 'oci://mrmhub.io/mikemrm'
version: '{{ template "chart.version" . }}'
```

{{ template "chart.homepageLine" . }}

{{ template "chart.maintainersSection" . }}

{{ template "chart.sourcesSection" . }}

{{ template "chart.requirementsSection" . }}

{{ template "chart.valuesSection" . }}

{{ template "helm-docs.versionFooter" . }}
110 changes: 110 additions & 0 deletions lemmy/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,110 @@
# lemmy

![Version: 0.1.0](https://img.shields.io/badge/Version-0.1.0-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 0.19.7](https://img.shields.io/badge/AppVersion-0.19.7-informational?style=flat-square)

lemmy

## Usage

Direct URL: `oci://mrmhub.io/mikemrm/lemmy`

Chart Dependency:

```yaml
dependencies:
- name: lemmy
repository: 'oci://mrmhub.io/mikemrm'
version: '0.1.0'
```
## Requirements
| Repository | Name | Version |
|------------|------|---------|
| oci://registry-1.docker.io/bitnamicharts | common | 2.27.0 |
## Values
| Key | Type | Default | Description |
|-----|------|---------|-------------|
| pictrs.enabled | bool | `true` | |
| pictrs.external.apiKey | string | `""` | |
| pictrs.external.url | string | `""` | |
| pictrs.image.digest | string | `""` | |
| pictrs.image.pullPolicy | string | `"IfNotPresent"` | |
| pictrs.image.registry | string | `""` | |
| pictrs.image.repository | string | `"asonix/pictrs"` | |
| pictrs.image.tag | string | `"0.5.16"` | |
| pictrs.labels | object | `{}` | |
| pictrs.resources | object | `{}` | |
| pictrs.resourcesPreset | string | `"micro"` | |
| proxy.config.allowedProxies | list | `[]` | |
| proxy.config.enabled | bool | `false` | |
| proxy.enabled | bool | `false` | |
| proxy.image.digest | string | `""` | |
| proxy.image.pullPolicy | string | `"IfNotPresent"` | |
| proxy.image.registry | string | `""` | |
| proxy.image.repository | string | `"nginx"` | |
| proxy.image.tag | string | `"1-alpine"` | |
| proxy.ingress.annotations | object | `{}` | |
| proxy.ingress.enabled | bool | `false` | |
| proxy.ingress.hosts | list | `[]` | |
| proxy.ingress.tls | list | `[]` | |
| proxy.labels | object | `{}` | |
| proxy.resources | object | `{}` | |
| proxy.resourcesPreset | string | `"nano"` | |
| server.config.corsOrigins | list | `[]` | |
| server.config.database.database | string | `""` | |
| server.config.database.host | string | `""` | |
| server.config.database.password | string | `""` | |
| server.config.database.passwordSecret | string | `""` | |
| server.config.database.poolSize | int | `0` | |
| server.config.database.port | int | `0` | |
| server.config.database.uri | string | `""` | |
| server.config.database.uriSecret | string | `""` | |
| server.config.database.user | string | `""` | |
| server.config.email.smtp.fromAddress | string | `""` | |
| server.config.email.smtp.login | string | `""` | |
| server.config.email.smtp.password | string | `""` | |
| server.config.email.smtp.passwordSecret | string | `""` | |
| server.config.email.smtp.server | string | `""` | |
| server.config.email.tls.type | string | `""` | |
| server.config.enabled | bool | `true` | |
| server.config.hostname | string | `""` | |
| server.config.opentelemetryURL | string | `""` | |
| server.config.retryCount | int | `0` | |
| server.config.setup.admin.email | string | `""` | |
| server.config.setup.admin.password | string | `""` | |
| server.config.setup.admin.username | string | `""` | |
| server.config.setup.site.name | string | `""` | |
| server.config.workerCount | int | `0` | |
| server.image.digest | string | `""` | |
| server.image.pullPolicy | string | `"IfNotPresent"` | |
| server.image.registry | string | `""` | |
| server.image.repository | string | `"dessalines/lemmy"` | |
| server.image.tag | string | `""` | |
| server.ingress.annotations | object | `{}` | |
| server.ingress.enabled | bool | `false` | |
| server.ingress.hosts | list | `[]` | |
| server.ingress.tls | list | `[]` | |
| server.labels | object | `{}` | |
| server.resources | object | `{}` | |
| server.resourcesPreset | string | `"micro"` | |
| server.serviceMonitor.enabled | bool | `false` | |
| server.serviceMonitor.labels | object | `{}` | |
| ui.enabled | bool | `true` | |
| ui.external.host | string | `""` | |
| ui.external.https | bool | `false` | |
| ui.image.digest | string | `""` | |
| ui.image.pullPolicy | string | `"IfNotPresent"` | |
| ui.image.registry | string | `""` | |
| ui.image.repository | string | `"dessalines/lemmy-ui"` | |
| ui.image.tag | string | `""` | |
| ui.ingress.annotations | object | `{}` | |
| ui.ingress.enabled | bool | `false` | |
| ui.ingress.hosts | list | `[]` | |
| ui.ingress.tls | list | `[]` | |
| ui.labels | object | `{}` | |
| ui.resources | object | `{}` | |
| ui.resourcesPreset | string | `"nano"` | |

47 changes: 47 additions & 0 deletions nginx-redirect/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
# nginx-redirect

![Version: 0.1.0](https://img.shields.io/badge/Version-0.1.0-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 1.27.3](https://img.shields.io/badge/AppVersion-1.27.3-informational?style=flat-square)

A simple deployment to redirect requests.

## Usage

Direct URL: `oci://mrmhub.io/mikemrm/nginx-redirect`

Chart Dependency:

```yaml
dependencies:
- name: nginx-redirect
repository: 'oci://mrmhub.io/mikemrm'
version: '0.1.0'
```
## Requirements
| Repository | Name | Version |
|------------|------|---------|
| oci://registry-1.docker.io/bitnamicharts | common | 2.27.2 |
## Values
| Key | Type | Default | Description |
|-----|------|---------|-------------|
| deployment.annotations | object | `{}` | |
| deployment.image.digest | string | `""` | |
| deployment.image.pullPolicy | string | `"IfNotPresent"` | |
| deployment.image.registry | string | `""` | |
| deployment.image.repository | string | `"nginx"` | |
| deployment.image.tag | string | `""` | |
| deployment.labels | object | `{}` | |
| deployment.podLabels | object | `{}` | |
| deployment.resources | object | `{}` | |
| deployment.resourcesPreset | string | `"nano"` | |
| fullnameOverride | string | `""` | |
| ingress.annotations | object | `{}` | |
| ingress.enabled | bool | `false` | |
| ingress.hosts | list | `[]` | |
| ingress.tls | object | `{}` | |
| nameOverride | string | `""` | |
| redirects | object | `{}` | |

62 changes: 62 additions & 0 deletions voyager/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
# voyager

![Version: 0.1.0](https://img.shields.io/badge/Version-0.1.0-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 2.19.4](https://img.shields.io/badge/AppVersion-2.19.4-informational?style=flat-square)

voyager

## Usage

Direct URL: `oci://mrmhub.io/mikemrm/voyager`

Chart Dependency:

```yaml
dependencies:
- name: voyager
repository: 'oci://mrmhub.io/mikemrm'
version: '0.1.0'
```
## Requirements
| Repository | Name | Version |
|------------|------|---------|
| oci://registry-1.docker.io/bitnamicharts | common | 2.27.0 |
## Values
| Key | Type | Default | Description |
|-----|------|---------|-------------|
| env | list | `[]` | |
| envFrom | list | `[]` | |
| image.digest | string | `""` | |
| image.pullPolicy | string | `"IfNotPresent"` | |
| image.registry | string | `"ghcr.io"` | |
| image.repository | string | `"aeharding/voyager"` | |
| image.tag | string | `""` | |
| ingress.annotations | object | `{}` | |
| ingress.enabled | bool | `false` | |
| ingress.hosts | list | `[]` | |
| ingress.tls | list | `[]` | |
| labels | object | `{}` | |
| lemmyServers | list | `[]` | |
| proxy.config.allowedProxies | list | `[]` | |
| proxy.config.enabled | bool | `true` | |
| proxy.config.lemmyServer | string | `""` | |
| proxy.enabled | bool | `false` | |
| proxy.image.digest | string | `""` | |
| proxy.image.pullPolicy | string | `"IfNotPresent"` | |
| proxy.image.registry | string | `""` | |
| proxy.image.repository | string | `"nginx"` | |
| proxy.image.tag | string | `"1-alpine"` | |
| proxy.ingress.annotations | object | `{}` | |
| proxy.ingress.enabled | bool | `false` | |
| proxy.ingress.hosts | list | `[]` | |
| proxy.ingress.tls | list | `[]` | |
| proxy.labels | object | `{}` | |
| proxy.resources | object | `{}` | |
| proxy.resourcesPreset | string | `"nano"` | |
| resources | object | `{}` | |
| resourcesPreset | string | `"nano"` | |
| service.enabled | bool | `false` | |

0 comments on commit 8649660

Please sign in to comment.