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
2 changes: 1 addition & 1 deletion .claude/skills/bump-questarr-version/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ Files to update to the new version (OLD -> NEW):
3. Home Assistant add-on: `questarr/config.yaml` (`version`) and `questarr/Dockerfile` (`ARG QUESTARR_VERSION`).
4. Umbrel: `doezer-questarr/umbrel-app.yml` (`version`).
5. CasaOS: `casaos/docker-compose.yml` (`x-casaos.version`).
6. Helm: `charts/questarr/Chart.yaml` `appVersion` = NEW and chart `version` patch bump (0.1.x -> 0.1.x+1, required on every chart change); example tag in `charts/questarr/README.md` (`v` + NEW).
6. Helm: `charts/questarr/Chart.yaml` `appVersion` = NEW and chart `version` patch bump (0.1.x -> 0.1.x+1, required on every chart change; `helm-publish.yml` publishes a new chart version to GHCR on merge and `helm-chart.yml` fails if `appVersion` differs from `package.json`); example tag in `charts/questarr/README.md` (`v` + NEW).
7. `docs/PRD.md`: the `**Version:**` line.

Check, don't blindly change:
Expand Down
12 changes: 12 additions & 0 deletions .github/workflows/helm-chart.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,13 @@ on:
branches: [main, release/*]
paths:
- "charts/**"
- "package.json"
- ".github/workflows/helm-chart.yml"
pull_request:
branches: [main, release/*]
paths:
- "charts/**"
- "package.json"
- ".github/workflows/helm-chart.yml"
workflow_dispatch:

Expand All @@ -34,6 +36,16 @@ jobs:
- name: Show Helm version
run: helm version

# The chart ships the Questarr version it installs by default, so it must follow package.json.
- name: Check appVersion matches package.json
run: |
app_version=$(sed -n 's/^appVersion: "\{0,1\}\([^"]*\)"\{0,1\}$/\1/p' charts/questarr/Chart.yaml)
pkg_version=$(jq -r .version package.json)
if [ "$app_version" != "$pkg_version" ]; then
echo "::error::charts/questarr/Chart.yaml appVersion ($app_version) differs from package.json version ($pkg_version)"
exit 1
fi
Comment thread
gitar-bot[bot] marked this conversation as resolved.
Resolved

- name: Lint the chart with default values
run: helm lint charts/questarr

Expand Down
88 changes: 88 additions & 0 deletions .github/workflows/helm-publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,88 @@
name: Helm chart publish

# Publishes charts/questarr as an OCI artifact on GHCR:
# helm install questarr oci://ghcr.io/doezer/charts/questarr --version <chart version>
# The chart `version` in Chart.yaml must be bumped on every chart change (helm-chart.yml and the
# bump-questarr-version skill already require it). A version that is already published is left
# untouched, so re-running this workflow or merging a change without a bump never overwrites a
# released chart.

on:
push:
branches: [main]
paths:
- "charts/**"
- ".github/workflows/helm-publish.yml"
workflow_dispatch:

permissions:
contents: read

concurrency:
group: helm-publish
cancel-in-progress: false

jobs:
publish:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write

steps:
- name: Harden the runner (Audit all outbound calls)
uses: step-security/harden-runner@1d88384fd173af6ecb012dfd0264a306b711241a # v2.22.4
with:
egress-policy: audit

- name: Checkout code
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v6.2.0
with:
persist-credentials: false

- name: Lint the chart
run: helm lint charts/questarr

- name: Read chart metadata
id: chart
run: |
echo "name=$(helm show chart charts/questarr | sed -n 's/^name: //p')" >> "$GITHUB_OUTPUT"
echo "version=$(helm show chart charts/questarr | sed -n 's/^version: //p')" >> "$GITHUB_OUTPUT"

- name: Log in to GHCR
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
ACTOR: ${{ github.actor }}
run: echo "$GITHUB_TOKEN" | helm registry login ghcr.io --username "$ACTOR" --password-stdin

- name: Publish the chart if this version is new
env:
CHART_NAME: ${{ steps.chart.outputs.name }}
CHART_VERSION: ${{ steps.chart.outputs.version }}
OWNER: ${{ github.repository_owner }}
run: |
set -euo pipefail
owner_lc=$(echo "$OWNER" | tr '[:upper:]' '[:lower:]')
ref="oci://ghcr.io/${owner_lc}/charts"
# Only a "not found" answer from the registry means the version is free to publish. Any
# other failure (network, outage, rate limit, auth) must fail the job rather than risk
# overwriting a released chart version.
if out=$(helm show chart "${ref}/${CHART_NAME}" --version "${CHART_VERSION}" 2>&1); then
echo "Chart ${CHART_NAME} ${CHART_VERSION} is already published; nothing to do."
exit 0
elif ! grep -qiE 'not found|manifest unknown|name unknown' <<<"$out"; then
echo "::error::Could not check for an existing chart: $out"
exit 1
fi
helm package charts/questarr --destination dist-chart
helm push "dist-chart/${CHART_NAME}-${CHART_VERSION}.tgz" "${ref}"
{
echo "## Helm chart published"
echo
echo "- **Chart:** ${ref}/${CHART_NAME}"
echo "- **Version:** ${CHART_VERSION}"
echo
echo '```bash'
echo "helm install questarr ${ref}/${CHART_NAME} --version ${CHART_VERSION} --namespace questarr --create-namespace"
echo '```'
} >> "$GITHUB_STEP_SUMMARY"
11 changes: 6 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -242,15 +242,16 @@ Questarr is available in the Unraid **Apps** tab via Community Applications:
<details>
<summary><b>Install with the bundled Helm chart</b></summary>

A Helm chart lives in [`charts/questarr`](charts/questarr). It is not published to a Helm
repository yet, so install it from a clone:
A Helm chart lives in [`charts/questarr`](charts/questarr) and is published as an OCI chart on
GitHub Container Registry:

```bash
git clone https://github.com/Doezer/Questarr.git
cd Questarr
helm install questarr charts/questarr --namespace questarr --create-namespace
helm install questarr oci://ghcr.io/doezer/charts/questarr --namespace questarr --create-namespace
```

You can also install it from a clone with
`helm install questarr charts/questarr --namespace questarr --create-namespace`.

Then port-forward (or enable the Ingress) and open the UI:

```bash
Expand Down
8 changes: 7 additions & 1 deletion charts/questarr/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: questarr
description: Questarr — an *Arr-inspired game manager that helps you discover, track, and automatically download the games you want.
type: application
# Chart version — bump on every chart change (SemVer).
version: 0.1.3
version: 0.1.4
# Version of Questarr shipped by default (image tag adds the v release prefix).
appVersion: "1.6.0"
kubeVersion: ">=1.23.0-0"
Expand All @@ -23,3 +23,9 @@ maintainers:
annotations:
category: MediaManagement
licenses: GPL-3.0-only
artifacthub.io/license: GPL-3.0-only
artifacthub.io/links: |
- name: Documentation
url: https://github.com/Doezer/Questarr/tree/main/docs
- name: Support
url: https://github.com/Doezer/Questarr/issues
9 changes: 7 additions & 2 deletions charts/questarr/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,13 @@ state Questarr persists).

## Install

The chart is not published to a Helm repository yet — install it from a clone of the
repository:
The chart is published as an OCI chart on GitHub Container Registry (Helm >= 3.8):

```bash
helm install questarr oci://ghcr.io/doezer/charts/questarr --namespace questarr --create-namespace
```

Pin a chart version with `--version <x.y.z>`. To install from a clone instead:

```bash
git clone https://github.com/Doezer/questarr.git
Expand Down
Loading