From aa8de3f8a390564b88db2625e4140f8d6d85cfe2 Mon Sep 17 00:00:00 2001 From: sHa Date: Tue, 16 Jun 2026 22:04:27 +0300 Subject: [PATCH] fix: update rflood chart version and appVersion; enhance update script for ghcr-tags-build support --- rflood/Chart.yaml | 6 +++--- scripts/update-charts.sh | 16 ++++++++++++++++ 2 files changed, 19 insertions(+), 3 deletions(-) diff --git a/rflood/Chart.yaml b/rflood/Chart.yaml index 028aafc..87d0310 100644 --- a/rflood/Chart.yaml +++ b/rflood/Chart.yaml @@ -2,7 +2,7 @@ apiVersion: v2 name: rflood description: rTorrent + Flood (hotio/rflood) Helm chart type: application -version: 0.1.8 -appVersion: "release-0.16.12" +version: 0.1.9 +appVersion: "release-51028c6" annotations: - version-source: ghcr-tags:hotio/rflood:^release-[0-9]+\.[0-9]+\.[0-9]+$ + version-source: ghcr-tags-build:hotio/rflood:^release-[a-f0-9]+-[0-9]+-linux-amd64$ diff --git a/scripts/update-charts.sh b/scripts/update-charts.sh index b1001c6..250d093 100755 --- a/scripts/update-charts.sh +++ b/scripts/update-charts.sh @@ -48,6 +48,22 @@ fetch_latest() { version=$(curl -s -H "Authorization: Bearer $token" "https://ghcr.io/v2/${repo}/tags/list?n=10000" | jq -r '.tags[]' | grep -E "$pattern" | sort -V -r | head -1) fi ;; + "ghcr-tags-build") + # For images tagged as --linux-; sorts by build number to find latest base tag. + local repo="${source_data%%:*}" + local pattern="${source_data#*:}" + [ "$pattern" = "$source_data" ] && pattern='^.*-[0-9]+-linux-amd64$' + local token + token=$(curl -s "https://ghcr.io/token?scope=repository:${repo}:pull" | jq -r '.token // empty') + if [ -n "$token" ]; then + version=$(curl -s -H "Authorization: Bearer $token" "https://ghcr.io/v2/${repo}/tags/list?n=10000" \ + | jq -r '.tags[]' \ + | grep -E "$pattern" \ + | sort -t'-' -k3 -rn \ + | head -1 \ + | sed 's/-[0-9]*-linux-.*$//') + fi + ;; *) return 1 ;;